LWN.net Logo

Refcounting is fine...

Refcounting is fine...

Posted Aug 31, 2011 14:25 UTC (Wed) by nix (subscriber, #2304)
In reply to: Refcounting is fine... by khim
Parent article: HP dropping webOS devices

Er, recursive reference loops are common in all sorts of designs. In pure refcounted ones, you have to use crocks like having a single object registry and having everything else have references to it, even if that is otherwise unnatural. A good few refcounted implementations (including Python and IIRC Ruby too) collect cyclic garbage just fine, by having a conventional GC as well (in Python's case, a generational GC with a variety of optimizations to take into account that most garbage is already collected by the refcounter, so most of what it will see is uncollectable).


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds