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 mConvexMesh2PolyhedronMesh;
delete mConvexMesh1PolygonVertexArray; delete mConvexMesh1PolygonVertexArray;
delete mConvexMesh2PolygonVertexArray; delete mConvexMesh2PolygonVertexArray;
delete mConvexMeshPolygonFaces; delete[] mConvexMeshPolygonFaces;
delete mConcaveMeshShape; delete mConcaveMeshShape;
delete mConcaveTriangleMesh; delete mConcaveTriangleMesh;

View File

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

View File

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