Hi All,
Quicky question.
I am creating a btTriangleMesh and then creating a btBvhTriangleMeshShape using that object.
Do I need to specifically delete the btTriangleMesh object?
I ask because in the RayTest demo they create btTriangleMesh object, but don't delete it.
does btTriangleMesh need to be deleted?
- Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
- Contact:
Re: does btTriangleMesh need to be deleted?
For btBvhTriangleMeshShape you need to keep the mesh data around (there is no deep copy of data), until you delete the btBvhTriangleMeshShape, and only then you can delete/free the btTriangleMesh. Some demos might leak memory, that needs to be fixed.
Re: does btTriangleMesh need to be deleted?
Ok, thanks for the answerErwin Coumans wrote:For btBvhTriangleMeshShape you need to keep the mesh data around (there is no deep copy of data), until you delete the btBvhTriangleMeshShape, and only then you can delete/free the btTriangleMesh. Some demos might leak memory, that needs to be fixed.