From f603e57e9ae9d9b7e3bf6b35924d99292cf6de43 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 11 Feb 2008 22:54:51 +0000 Subject: * Added PhysicsScene.Dispose() * In ODE, disposing of all of the ODE objects and the ODE World to reclaim memory when the simulator restarts. --- OpenSim/Region/Environment/Scenes/Scene.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 88cda40..6b4f377 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -472,6 +472,11 @@ namespace OpenSim.Region.Environment.Scenes // This causes the region to restart immediatley. public void RestartNow() { + if (PhysicsScene != null) + { + PhysicsScene.Dispose(); + } + m_log.Error("[REGION]: Closing"); Close(); m_log.Error("[REGION]: Firing Region Restart Message"); -- cgit v1.1