[ODE] Ode.NET and space/geometry memory management
deplinenoise at gmail.com
Mon Nov 27 07:10:15 MST 2006
On 11/27/06, Jason Perkins <starkos at gmail.com> wrote:
> This really isn't a .NET specific question. Even if you are using C,
> trying to use a geom both inside and outside of a space, where one or
> both could be released at any time, will require some custom
> management code.
I realize that. I'm just trying to wrap my head around how to use the
API without leaking memory and without crashing the program.
The point is that "some custom management code" could amount to a lot
of work when the API pushes all lifetime and management issues to
managed code. The only object-oriented wrapper for ODE (OdeDotNet on
sourceforge) conveniently leaves out resource deallocation because
it's hard to determine when it's OK to destroy a Space and/or Geom
object because of pointers retained inside ODE.
I guess what I'm getting at is how to answer the question "Does any
part of ODE still rely on this unmanaged resource" (say, a Geom) so
that it becomes safe to work with the API from a higher-level
My other car is a cons.
More information about the ODE