[DGD] Memory management
Jay Shaffstall
jshaffst at netwalk.com
Tue Mar 19 19:49:41 CET 2002
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.
However, I've seen mudlib code that specifically uses destruct_object to
free up objects, more than what I would think would be necessary for a
reference counting system. For example, the kernel, during the
/kernel/obj/user logout method, specifically destructs both the wiztool and
the user itself.
Given reference counting, I'd expect to see the user object destruct
itself, and then the number of references to the wiztool should drop to
zero, leaving it free to be cleaned up by garbage collection. In fact, it
seems that if the user object knows about everyone who might have a
reference to it, it could simply tell those objects to remove the
references and avoid needing to destruct itself at all.
What am I missing?
Thanks,
Jay
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list