aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-01 06:32:30 +0100
committerJustin Clark-Casey (justincc)2011-08-01 06:32:30 +0100
commitf32dbef64715bb389a0aa8cd7d2a994e6b168b61 (patch)
tree47a8f08a60bbec9777b25e9fc6330c70d11c92cd /OpenSim
parentrefactor: centralize prim geom removal code from four places to one (diff)
downloadopensim-SC_OLD-f32dbef64715bb389a0aa8cd7d2a994e6b168b61.zip
opensim-SC_OLD-f32dbef64715bb389a0aa8cd7d2a994e6b168b61.tar.gz
opensim-SC_OLD-f32dbef64715bb389a0aa8cd7d2a994e6b168b61.tar.bz2
opensim-SC_OLD-f32dbef64715bb389a0aa8cd7d2a994e6b168b61.tar.xz
When an ODE geom is removed (as when a non-phantom prim is deleted, resized or shape changed, also remove the OdeScene.actor_name_map entry pointing to the phys actor
This is to stop a small memory leak over time when prims are deleted or phantom-toggled
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index e90df48..16764c2 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -1448,6 +1448,7 @@ Console.WriteLine("CreateGeom:");
1448 { 1448 {
1449 try 1449 try
1450 { 1450 {
1451 _parent_scene.actor_name_map.Remove(prim_geom);
1451 d.GeomDestroy(prim_geom); 1452 d.GeomDestroy(prim_geom);
1452 prim_geom = IntPtr.Zero; 1453 prim_geom = IntPtr.Zero;
1453 } 1454 }
@@ -1455,6 +1456,7 @@ Console.WriteLine("CreateGeom:");
1455 { 1456 {
1456 prim_geom = IntPtr.Zero; 1457 prim_geom = IntPtr.Zero;
1457 m_log.ErrorFormat("[PHYSICS]: PrimGeom dead for {0}", Name); 1458 m_log.ErrorFormat("[PHYSICS]: PrimGeom dead for {0}", Name);
1459
1458 return false; 1460 return false;
1459 } 1461 }
1460 1462