[ODE] ode leaks in trimesh
Geoff Carlton
gcarlton at iinet.net.au
Wed Sep 22 09:35:12 MST 2004
I regard to the earlier post of leaks in the trimesh code, I while ago
when I looked at it there were two distinct issues.
Firstly, for my case I wanted 0 memory allocated at the exit point of
the program, and so the statics had to manually be cleared with the
following code:
dxTriMesh::defaultSphereCache.TouchedPrimitives.Empty();
dxTriMesh::defaultBoxCache.TouchedPrimitives.Empty();
dxTriMesh::defaultCCylinderCache.TouchedPrimitives.Empty();
Also, I noted that the dArray didn't appear to call the element's
destructors on clearing, which is critical. For the three trimesh
caches, to avoid a leak you'd have to manually clear each element's
TouchedPrimitives list before calling resizing the cache array.
However, at that point I stopped working on the prototype with ode and
I'm not sure whether these issues still exist in the current version -
when I get around to using trimeshes again I'll make sure.
Geoff
More information about the ODE
mailing list