aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-11 22:54:51 +0000
committerTeravus Ovares2008-02-11 22:54:51 +0000
commitf603e57e9ae9d9b7e3bf6b35924d99292cf6de43 (patch)
tree5b3395faf6d8d9c46006f4d7fdb2ddfe36bd8be6 /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
parentTiny change to print out a warning in a situation which almost guaranteeably ... (diff)
downloadopensim-SC_OLD-f603e57e9ae9d9b7e3bf6b35924d99292cf6de43.zip
opensim-SC_OLD-f603e57e9ae9d9b7e3bf6b35924d99292cf6de43.tar.gz
opensim-SC_OLD-f603e57e9ae9d9b7e3bf6b35924d99292cf6de43.tar.bz2
opensim-SC_OLD-f603e57e9ae9d9b7e3bf6b35924d99292cf6de43.tar.xz
* Added PhysicsScene.Dispose()
* In ODE, disposing of all of the ODE objects and the ODE World to reclaim memory when the simulator restarts.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 2b3d186..e58984b 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -73,6 +73,8 @@ namespace OpenSim.Region.Physics.OdePlugin
73 73
74 public void Dispose() 74 public void Dispose()
75 { 75 {
76
77 d.CloseODE();
76 } 78 }
77 } 79 }
78 80
@@ -1509,5 +1511,23 @@ namespace OpenSim.Region.Physics.OdePlugin
1509 public override void DeleteTerrain() 1511 public override void DeleteTerrain()
1510 { 1512 {
1511 } 1513 }
1514 public override void Dispose()
1515 {
1516 lock (OdeLock)
1517 {
1518
1519 foreach (OdePrim prm in _prims)
1520 {
1521 RemovePrim(prm);
1522 }
1523
1524 foreach (OdeCharacter act in _characters)
1525 {
1526 RemoveAvatar(act);
1527 }
1528 d.WorldDestroy(world);
1529 //d.CloseODE();
1530 }
1531 }
1512 } 1532 }
1513} 1533}