[ODE] Reference counters

Lukasz Stafiniak lukstafi at gmail.com
Mon Aug 29 09:23:35 MST 2005

2005/8/29, Jon Watte (ODE) <hplus-ode at mindcontrol.org>:
> Reference counting adds significant memory traffic (especially if it's
> moderately thread-safe, and uses interlocked exchange).

My idea is that the mechanism is implemented by the user, and the ODE
provides only a plug-in function call in destroy functions and a third
cleanup mode with conditional destroy (with user specified "plug-in"
condition function).
> My vote is that, if this gets added, it's added with an ifdef that
> defaults to off.

> Also, the API for the user would have to change, as you'd need
> dBodyAddRef(), dBodyRelease(), and similar functions for each data
> structure returned from ODE.
My idea is that API doesn't change at all because it is the user who
implements the feature. The only change is the third cleanup mode and
two function placeholders. And in implementation, a pointer stored in
relevant structs (dxBody, dxJoint and dxGeom) passed to these

> Cheers,
>                        / h+
Best Regards,

More information about the ODE mailing list