
Thanks everyone. Good to know! On Fri, Feb 12, 2010 at 10:45 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
Stephen J. Turnbull wrote:
This is covered in the manuals, but the gist is that every Python object knows how many other objects are pointing to it (called a refcount). When an object's refcount drops to zero, it gets collected (immediately, IIRC).
This description applies for CPython (the one from python.org), since that uses refcounting with cyclic garbage collection. Other Python implementations work differently (e.g. Jython and IronPython rely on the garbage collector in their underlying VMs)
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------
-- Gerald Britton