From ea91a36483f3eba90e16b664715d152f9eca2980 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 11 Jul 2012 23:33:13 +0200 Subject: Add instrumentation to log finalizer being called. Suppressed for backup interim copies to avoid spammage. Not for release to the grid, must be reverted first! --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 + OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1734ab7..1730723 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2045,6 +2045,7 @@ namespace OpenSim.Region.Framework.Scenes { part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); part.KeyframeMotion.UpdateSceneObject(this); + part.SuppressFinalizerLogging = true; } }); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 16a8588..4d43943 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -149,6 +149,8 @@ namespace OpenSim.Region.Framework.Scenes #region Fields + public bool SuppressFinalizerLogging = false; + public bool AllowedDrop; public bool DIE_AT_EDGE; @@ -350,15 +352,18 @@ namespace OpenSim.Region.Framework.Scenes #endregion Fields -// ~SceneObjectPart() -// { + ~SceneObjectPart() + { + if (SuppressFinalizerLogging) + return; + // Console.WriteLine( // "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", // Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); -// m_log.DebugFormat( -// "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", -// Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); -// } + m_log.DebugFormat( + "[SCENE OBJECT PART]: Destructor called for {0}, local id {1}, parent {2} {3}", + Name, LocalId, ParentGroup.Name, ParentGroup.LocalId); + } #region Constructors -- cgit v1.1