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?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
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.
-
- Posts: 43
- Joined: Wed Mar 04, 2015 6:16 pm
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.