[DGD] Memory management

Erwin Harte harte at xs4all.nl
Tue Mar 19 20:24:00 CET 2002


On Tue, Mar 19, 2002 at 01:49:41PM -0500, Jay Shaffstall wrote:
> I probably just need a pointer in the right direction, but I'm getting a 
> bit confused on DGD's memory  management.
> 
> My impression was that DGD used a reference counting scheme to free up 
> objects that no longer had references, similar to Java's garbage collection.
> 
[...]
> 
> What am I missing?

There are two types of objects, persistent (regular) objects, and the
so-called lightweight objects a.k.a LWOs.  LWOs are created using the
new_object() kfun and will disappear automatically, whereas regular
objects are created using compile_object() for standalone objects and
clone base-objects, clone_object() for clones, and zapped into
oblivion using destruct_object().

The LWOs come with some limitations, such as the fact that you can't
use them as special objects, and call_out()s can't be used in them.

Hope this helps,

Erwin.
-- 
Erwin Harte <harte at xs4all.nl>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list