diff options
author | Robert Adams | 2012-07-26 15:27:18 -0700 |
---|---|---|
committer | Robert Adams | 2012-07-26 15:27:18 -0700 |
commit | c1503205c028437507e2b8e4ab90e1258b1e9d60 (patch) | |
tree | 7f3277d5672f3c08e5de1845ba80e316649233c0 /OpenSim | |
parent | BulletSim: update BulletSim DLLs and SOs (diff) | |
download | opensim-SC_OLD-c1503205c028437507e2b8e4ab90e1258b1e9d60.zip opensim-SC_OLD-c1503205c028437507e2b8e4ab90e1258b1e9d60.tar.gz opensim-SC_OLD-c1503205c028437507e2b8e4ab90e1258b1e9d60.tar.bz2 opensim-SC_OLD-c1503205c028437507e2b8e4ab90e1258b1e9d60.tar.xz |
Add a Dispose() of the physics engine when a scene is being shutdown.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 24f62e3..1734704 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1222,6 +1222,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1222 | 1222 | ||
1223 | m_sceneGraph.Close(); | 1223 | m_sceneGraph.Close(); |
1224 | 1224 | ||
1225 | if (PhysicsScene != null) | ||
1226 | { | ||
1227 | PhysicsScene phys = PhysicsScene; | ||
1228 | // remove the physics engine from both Scene and SceneGraph | ||
1229 | PhysicsScene = null; | ||
1230 | phys.Dispose(); | ||
1231 | phys = null; | ||
1232 | } | ||
1233 | |||
1225 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) | 1234 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) |
1226 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); | 1235 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); |
1227 | 1236 | ||