[ODE] Re: Memory leak from dBodySetPosition()?

J. Perkins starkos at gmail.com
Tue Apr 26 12:49:24 MST 2005


On 4/25/05, Geoff Carlton <gcarlton at iinet.net.au> wrote:
> Trimesh has some static caches that need to be cleared.  Try adding a
> function in trimesh.cpp that is called during dCloseODE.
> 
> void dClearTrimeshCaches(void)
> {
>     dxTriMesh::defaultSphereCache.TouchedPrimitives.Empty();
>     dxTriMesh::defaultBoxCache.TouchedPrimitives.Empty();
>     dxTriMesh::defaultCCylinderCache.TouchedPrimitives.Empty();
>     dxTriMesh::Faces.Empty();
> }

That did it, thanks for the assist. With one change: you can't call
Faces.Empty() because the inheritance from Container is private. I
don't know if this is an issue.   Even without that line my memory
leak report is now clean.

Thanks again,
Jason



More information about the ODE mailing list