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.0.7.2-post-fixes
parent
d4fc07aae1
commit
057b78bfbe
|
@ -1633,6 +1633,8 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
/// <param name="obj"></param>
|
||||
internal void AddCollisionEventReporting(PhysicsActor obj)
|
||||
{
|
||||
// m_log.DebugFormat("[PHYSICS]: Adding {0} to collision event reporting", obj.SOPName);
|
||||
|
||||
lock (_collisionEventPrim)
|
||||
{
|
||||
if (!_collisionEventPrim.Contains(obj))
|
||||
|
@ -1646,12 +1648,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
/// <param name="obj"></param>
|
||||
internal void RemoveCollisionEventReporting(PhysicsActor obj)
|
||||
{
|
||||
// m_log.DebugFormat("[PHYSICS]: Removing {0} from collision event reporting", obj.SOPName);
|
||||
|
||||
lock (_collisionEventPrim)
|
||||
{
|
||||
if (!_collisionEventPrim.Contains(obj))
|
||||
_collisionEventPrim.Remove(obj);
|
||||
}
|
||||
}
|
||||
|
||||
#region Add/Remove Entities
|
||||
|
||||
|
|
Loading…
Reference in New Issue