[ODE] Reference counters
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Sun Aug 28 18:00:46 MST 2005
Reference counting adds significant memory traffic (especially if it's
moderately thread-safe, and uses interlocked exchange).
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.
Lukasz Stafiniak wrote:
> I am writing a memory-safe port of ODE for the OCaml language. For
> this, I needed reference counters for dxBody, dxJoint, dxGeom: this
> adds one pointer to these structures (initializing it to 0), calling a
> macro when destroying them, and destroying them conditionally in
> cleanup mode (this could be a third cleanup mode, for this is a
> convenience and not a necessity). What do you think about it? Could it
> be included into the main ODE?
> Best Regards,
> Lukasz Stafiniak
> ODE mailing list
> ODE at q12.org
More information about the ODE