aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2012-07-23 13:48:40 -0700
committerRobert Adams2012-07-23 16:32:36 -0700
commit8a574395c7626f0aef596cbb928e0b4139ebab12 (patch)
treea6a325172ecec7f6a94322ab51d6fa6d366382b0 /OpenSim
parentBulletSim: add all the new functions to BulletSimAPI. (diff)
downloadopensim-SC-8a574395c7626f0aef596cbb928e0b4139ebab12.zip
opensim-SC-8a574395c7626f0aef596cbb928e0b4139ebab12.tar.gz
opensim-SC-8a574395c7626f0aef596cbb928e0b4139ebab12.tar.bz2
opensim-SC-8a574395c7626f0aef596cbb928e0b4139ebab12.tar.xz
BulletSim: add Dispose() code to free up resources and close log files.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 8773485..7cc3fe3 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -630,6 +630,27 @@ public class BSScene : PhysicsScene, IPhysicsParameters
630 public override void Dispose() 630 public override void Dispose()
631 { 631 {
632 // m_log.DebugFormat("{0}: Dispose()", LogHeader); 632 // m_log.DebugFormat("{0}: Dispose()", LogHeader);
633
634 // make sure no stepping happens while we're deleting stuff
635 m_initialized = false;
636
637 foreach (KeyValuePair<uint, BSCharacter> kvp in m_avatars)
638 {
639 kvp.Value.Destroy();
640 }
641 m_avatars.Clear();
642
643 foreach (KeyValuePair<uint, BSPrim> kvp in m_prims)
644 {
645 kvp.Value.Destroy();
646 }
647 m_prims.Clear();
648
649 // Anything left in the unmanaged code should be cleaned out
650 BulletSimAPI.Shutdown(WorldID);
651
652 // Not logging any more
653 PhysicsLogging.Close();
633 } 654 }
634 655
635 public override Dictionary<uint, float> GetTopColliders() 656 public override Dictionary<uint, float> GetTopColliders()