[Python-bugs-list] [ python-Bugs-484950 ] docs suggest no cyclic garbage collectio
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 28 Nov 2001 05:52:01 -0800
Bugs item #484950, was opened at 2001-11-23 10:50
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=484950&group_id=5470
Category: Documentation
Group: None
>Status: Open
Resolution: None
Priority: 5
Submitted By: Zooko Ozoko (zooko)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: docs suggest no cyclic garbage collectio
Initial Comment:
http://python.sourceforge.net/devel-docs/ext/refcounts.html
Section 1.10 is a bit out of date -- it would lead some
readers to believe that Python doesn't collect cyclical
garbage.
----------------------------------------------------------------------
>Comment By: Zooko Ozoko (zooko)
Date: 2001-11-28 05:52
Message:
Logged In: YES
user_id=52562
The last paragraph contrasts Python's chosen strategy,
reference counting, with
the more standard "automatic garbage collection". Most
readers will know that
reference counting suffers from the problem of not
collecting cyclical garbage
where garbage collection does not. Thus, seeing the two
contrasted like this,
and the reason for Python's lack of garbage collection being
given as "there
isn't a good one available", they may infer that Python
doesn't collect cyclical
garbage.
I suggest to strike the last paragraph and replace it with
something like:
"""
The strategy of reference counting traditionally suffers
from the problem that
the interpreter doesn't collect "cyclical garbage".
Cyclical garbage is a set
of objects which have been unlinked so that they are
unreachable, but they
contain references to each other so that each object's
counter is non-zero.
As of version 2.0, Python includes a "garbage cycle
collector" which recovers the
memory from cyclical garbage as well. (Note that there is
an important caveat
that the cycle collector does not free objects which contain
`__del__' methods,
although the normal non-cyclic reference counting system
will free those
objects. Please see XXX for more information.)
"""
Regards,
Zooko
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-11-27 22:28
Message:
Logged In: YES
user_id=3066
Oops, that was *pending*, not closed!
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-11-27 22:19
Message:
Logged In: YES
user_id=3066
I must be missing something; what makes you think this
implies cyclical garbage isn't collected?
Marked pending awaiting further information.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=484950&group_id=5470