[Opensim-dev] physics architecture

dan miller danbmil99 at yahoo.com
Sat Nov 3 08:39:44 UTC 2007


--- Tleiades Hax <tleiades at gmail.com> wrote:

> Sub-classing sounds like a good strategy, but you cannot rely on the
> destructor to assist you in cleaning up. In .NET/Mono destructors are
> being
> called when ever the garbage collector feels like it. I think you'll need
> the IDisposable pattern.

Right, that pesky GC.  So implicit destructors are out; but you can just
have a .delete() method that does all the cleanup, null your refs, and let
the GC take care of it in its own sweet time.

I don't care much about the mechanics; what's important to me is that the
physics engine can intermediate all interactions with objects as necessary. 
This way, you can have the setup & breakdown stuff all in one place, rather
than sprinkled randomly throughout the codebase.

-dan




More information about the Opensim-dev mailing list