Browse Source

Fixed memory leak in convex hull generation.

Lasse Öörni 14 years ago
parent
commit
b56a1cd1fb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Engine/Physics/CollisionShape.cpp

+ 2 - 0
Engine/Physics/CollisionShape.cpp

@@ -194,6 +194,8 @@ TriangleMeshData::TriangleMeshData(Model* model, bool makeConvexHull, float thic
         // Copy index data
         indexData_ = new unsigned[indexCount];
         memcpy(indexData_.GetPtr(), result.mIndices, indexCount * sizeof(unsigned));
+        
+        lib.ReleaseResult(result);
     }
     
     triMesh_ = dGeomTriMeshDataCreate();