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

avinationmerge
Melanie 2012-05-04 20:06:42 +02:00
parent 1183310a05
commit b5b21013da
1 changed files with 2 additions and 2 deletions

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