Re: Is garbage collection here yet?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Is garbage collection here yet?

From: Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Date: Wed Mar 15 2006 - 08:52:21 CET

Artur <mail@xdobry.de> wrote:
> Working quite long with GC-languages I can say: Also GC-Systems has
> memory leaks (circular references)

Java does *not* have problems with circular references.

Java does some bookkeeping of what objects hold references
to what other objects. Once the GC happens, it will detect
all objects that have a live (not just any) reference on it,
and any clusters of circular referenced objects that are not
also referenced from outside are swept away.

This kind of GC does require a deep knowledge of all
involved types, and may be somewhat expensive (more than
ref-count based GC), but it definitely doesn't leak for
circular refs.
Received on Sun Apr 30 02:33:03 2006