From f32dbef64715bb389a0aa8cd7d2a994e6b168b61 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 1 Aug 2011 06:32:30 +0100 Subject: 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 --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 2 ++ 1 file changed, 2 insertions(+) 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:"); { try { + _parent_scene.actor_name_map.Remove(prim_geom); d.GeomDestroy(prim_geom); prim_geom = IntPtr.Zero; } @@ -1455,6 +1456,7 @@ Console.WriteLine("CreateGeom:"); { prim_geom = IntPtr.Zero; m_log.ErrorFormat("[PHYSICS]: PrimGeom dead for {0}", Name); + return false; } -- cgit v1.1