From f8d8366bfa6f048107d22b4b73af22803810be81 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 7 Aug 2009 03:04:06 +0100 Subject: Revert the XEngine memleak patch, it causes premature GC. This matches behavior seen with an earlier attempt to do this, apparently the sponsor mechanism does't work in Mono --- OpenSim/Region/Framework/Scenes/EventManager.cs | 11 +++++------ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 16 ++++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 1d4d6d7..086496e 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -953,12 +953,11 @@ namespace OpenSim.Region.Framework.Scenes // this lets us keep track of nasty script events like timer, etc. public void TriggerTimerEvent(uint objLocalID, double Interval) { - throw new NotImplementedException("TriggerTimerEvent was thought to be not used anymore and the registration for the event from scene object part has been commented out due to a memory leak"); - //handlerScriptTimerEvent = OnScriptTimerEvent; - //if (handlerScriptTimerEvent != null) - //{ - // handlerScriptTimerEvent(objLocalID, Interval); - //} + handlerScriptTimerEvent = OnScriptTimerEvent; + if (handlerScriptTimerEvent != null) + { + handlerScriptTimerEvent(objLocalID, Interval); + } } /// diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 61dfa52..bc11709 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3673,14 +3673,14 @@ if (m_shape != null) { return; } - //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) - //{ - // m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting; - //} - //else - //{ - // m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting; - //} + if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) + { + m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting; + } + else + { + m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting; + } LocalFlags=(PrimFlags)objectflagupdate; -- cgit v1.1