mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Add a Dispose() of the physics engine when a scene is being shutdown.
This commit is contained in:
@@ -1222,6 +1222,15 @@ namespace OpenSim.Region.Framework.Scenes
|
|||||||
|
|
||||||
m_sceneGraph.Close();
|
m_sceneGraph.Close();
|
||||||
|
|
||||||
|
if (PhysicsScene != null)
|
||||||
|
{
|
||||||
|
PhysicsScene phys = PhysicsScene;
|
||||||
|
// remove the physics engine from both Scene and SceneGraph
|
||||||
|
PhysicsScene = null;
|
||||||
|
phys.Dispose();
|
||||||
|
phys = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!GridService.DeregisterRegion(RegionInfo.RegionID))
|
if (!GridService.DeregisterRegion(RegionInfo.RegionID))
|
||||||
m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name);
|
m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user