bullet: Plug memory leaks

Signed-off-by: deflected <deflected@github>
This commit is contained in:
deflected 2016-04-21 21:24:15 +03:00
parent ad04a4b026
commit bffe3bf55a
2 changed files with 5 additions and 1 deletions

View File

@ -18,7 +18,7 @@ INLINE BulletHeightfieldShape::
~BulletHeightfieldShape() {
delete _shape;
delete _data;
delete [] _data;
}
/**

View File

@ -134,6 +134,8 @@ add_geom(const Geom *geom, bool remove_duplicate_vertices, const TransformState
_mesh->addTriangle(v0, v1, v2, remove_duplicate_vertices);
}
}
delete [] vertices;
}
/**
@ -163,6 +165,8 @@ add_array(const PTA_LVecBase3 &points, const PTA_int &indices, bool remove_dupli
_mesh->addTriangle(v0, v1, v2, remove_duplicate_vertices);
}
delete [] vertices;
}
/**