ODEPlugin now frees source mesh data after conversion to pinned lists to save memory

0.6.0-stable
Dahlia Trimble 2008-08-27 23:39:50 +00:00
parent e593a333c7
commit 2c842652c1
1 changed files with 2 additions and 0 deletions

View File

@ -683,6 +683,8 @@ namespace OpenSim.Region.Physics.OdePlugin
float[] vertexList = primMesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory float[] vertexList = primMesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory
int[] indexList = primMesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage 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 VertexCount = vertexList.GetLength(0)/3;
int IndexCount = indexList.GetLength(0); int IndexCount = indexList.GetLength(0);