From 2c842652c16683c11c96eb0b89c150c857b58f2f Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Wed, 27 Aug 2008 23:39:50 +0000 Subject: [PATCH] ODEPlugin now frees source mesh data after conversion to pinned lists to save memory --- 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 c01626a98e..eafce5af16 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -683,6 +683,8 @@ namespace OpenSim.Region.Physics.OdePlugin float[] vertexList = primMesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory int[] indexList = primMesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage + primMesh.releaseSourceMeshData(); // free up the original mesh data to save memory + int VertexCount = vertexList.GetLength(0)/3; int IndexCount = indexList.GetLength(0);