[DGD] DGD's memory management

Felix A. Croes felix at dworkin.nl
Sat Mar 27 12:42:48 CET 2004


Steve Wooster <swooster at xprt.net> wrote:

>      I had a question about DGD's memory management... I know that an LWO 
> is removed as soon as there are no more references to it. I've also heard 
> that self-referencing array/mapping circles are automatically cleaned up by 
> DGD. If I have two LWOs that reference each other, but no other objects 
> reference them, will they be cleaned up automatically like self-referencing 
> arrays?

Yes.


> What about an LWO which references an array which references 
> another LWO which references the first LWO (or other situations similar to 
> this)?

Those will be removed too.


> I want to make a tree of LWOs, but I'm a bit worried about creating 
> a memory leak. Thanks for any info.

Leaking memory is still possible in the following cases:

 - by not destructing a persistent object that is no longer used
 - by inadvertedly keeping a reference to a datastructure which is
   no longer used

Otherwise, DGD takes care of deallocation, no matter how complex the
datastructure.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list