aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-25 21:38:02 +0100
committerJustin Clark-Casey (justincc)2011-10-25 21:40:51 +0100
commit7b6b36cee930c61c5d760bbf6089b90567401468 (patch)
tree4e64326722903dc65c28324c4eb2a768ecf14f1c /OpenSim/Region
parentminor: rename a parameter in OdeScene.Simulate() from actor -> prim since it'... (diff)
downloadopensim-SC-7b6b36cee930c61c5d760bbf6089b90567401468.zip
opensim-SC-7b6b36cee930c61c5d760bbf6089b90567401468.tar.gz
opensim-SC-7b6b36cee930c61c5d760bbf6089b90567401468.tar.bz2
opensim-SC-7b6b36cee930c61c5d760bbf6089b90567401468.tar.xz
Fix bug where collision event listeners were not removed once the listener had gone away.
This was causing continuous use of temporary memory even when all avatars had left the scene. Memory does leak but it does cause more calls to the garbage collector, which would pause the scene thread for a very short while during collection.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 2b29ce4..c3279c6 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -1633,6 +1633,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1633 /// <param name="obj"></param> 1633 /// <param name="obj"></param>
1634 internal void AddCollisionEventReporting(PhysicsActor obj) 1634 internal void AddCollisionEventReporting(PhysicsActor obj)
1635 { 1635 {
1636// m_log.DebugFormat("[PHYSICS]: Adding {0} to collision event reporting", obj.SOPName);
1637
1636 lock (_collisionEventPrim) 1638 lock (_collisionEventPrim)
1637 { 1639 {
1638 if (!_collisionEventPrim.Contains(obj)) 1640 if (!_collisionEventPrim.Contains(obj))
@@ -1646,11 +1648,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1646 /// <param name="obj"></param> 1648 /// <param name="obj"></param>
1647 internal void RemoveCollisionEventReporting(PhysicsActor obj) 1649 internal void RemoveCollisionEventReporting(PhysicsActor obj)
1648 { 1650 {
1651// m_log.DebugFormat("[PHYSICS]: Removing {0} from collision event reporting", obj.SOPName);
1652
1649 lock (_collisionEventPrim) 1653 lock (_collisionEventPrim)
1650 { 1654 _collisionEventPrim.Remove(obj);
1651 if (!_collisionEventPrim.Contains(obj))
1652 _collisionEventPrim.Remove(obj);
1653 }
1654 } 1655 }
1655 1656
1656 #region Add/Remove Entities 1657 #region Add/Remove Entities