[ODE] memory leak

Jon Watte (ODE) hplus-ode at mindcontrol.org
Tue Sep 13 09:53:00 MST 2005


I think the theory is that anything you create, you should delete. The 
thing with joints is that they often have two bodies, so trying to 
implement some kind of reference counting would be pretty messy, and 
still preclude joint re-use in some usage scenarios.

So, I'd say your program has a leak of ODE objects, rather than ODE.

Cheers,

			/ h+


Denes Nagymathe wrote:
> Hi all,
>  
> I've just realized that dBodyDestroy() only clears the body references 
> in the joints of the deleted body, but doesn't destroy them! This means 
> that those joints remain in the world's joint list, and even simulated, 
> but ineffective.
> Does this have any meaning (except for joints that are in groups and 
> cannot be destroyed alone) ?
> I've changed it to destroy the joints and that perfectly solves the 
> issue; but i don't use any joint groups (contact group for example), so 
> my joints are destroyable.
>  
> Denes
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode


More information about the ODE mailing list