Fix memory leaks in tests

This commit is contained in:
Daniel Chappuis 2018-03-29 07:40:24 +02:00
parent cd897f1151
commit d55c7e3b91
3 changed files with 4 additions and 2 deletions

View File

@ -462,7 +462,7 @@ class TestCollisionWorld : public Test {
delete mConvexMesh2PolyhedronMesh;
delete mConvexMesh1PolygonVertexArray;
delete mConvexMesh2PolygonVertexArray;
delete mConvexMeshPolygonFaces;
delete[] mConvexMeshPolygonFaces;
delete mConcaveMeshShape;
delete mConcaveTriangleMesh;

View File

@ -170,11 +170,12 @@ class TestPointInside : public Test {
/// Destructor
virtual ~TestPointInside() {
delete mWorld;
delete mBoxShape;
delete mSphereShape;
delete mCapsuleShape;
delete mConvexMeshShape;
delete mConvexMeshPolygonFaces;
delete[] mConvexMeshPolygonFaces;
delete mConvexMeshPolygonVertexArray;
delete mConvexMeshPolyhedronMesh;
}

View File

@ -308,6 +308,7 @@ class TestRaycast : public Test {
/// Destructor
virtual ~TestRaycast() {
delete mWorld;
delete mBoxShape;
delete mSphereShape;
delete mCapsuleShape;