Reverse the order of physics event unsubscription to allow GC. Adapted from Unit's reverted patch

This commit is contained in:
Melanie
2012-05-04 20:06:42 +02:00
parent 1183310a05
commit b5b21013da

View File

@@ -1065,9 +1065,9 @@ namespace OpenSim.Region.Framework.Scenes
{
// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
PhysicsActor.UnSubscribeEvents();
PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
PhysicsActor.UnSubscribeEvents();
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
PhysicsActor = null;
}
// else