[Patches] [ python-Patches-1200018 ] Restore GC support to set objects
SourceForge.net
noreply at sourceforge.net
Thu May 12 00:41:06 CEST 2005
Patches item #1200018, was opened at 2005-05-11 13:16
Message generated for change (Comment added) made by bwarsaw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1200018&group_id=5470
Category: Core (C code)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 7
Submitted By: Barry A. Warsaw (bwarsaw)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Restore GC support to set objects
Initial Comment:
Contrary to what the log message for setobject.c 1.26
implies, built-in sets can indeed participate in
cycles, so they must support GC. This patch restores
GC support to built-in sets for Python 2.4. It should
be ported to Python 2.5.
----------------------------------------------------------------------
>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2005-05-11 18:41
Message:
Logged In: YES
user_id=12800
Even without the __del__() method, notice how the second
gc.collect() prints 0. With the patch it prints 4.
----------------------------------------------------------------------
Comment By: Jim Jewett (jimjjewett)
Date: 2005-05-11 18:20
Message:
Logged In: YES
user_id=764593
Clarification: cycle.py *as posted* does not demonstrate the
problem, but if you uncomment the __del__ method in class
foo, you will get uncollectable garbage.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2005-05-11 15:59
Message:
Logged In: YES
user_id=12800
cycle.py demonstrates the need for this patch
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw)
Date: 2005-05-11 15:58
Message:
Logged In: YES
user_id=12800
Actually, use set-patch2.txt because I don't believe you
need to clear so->data in set_tp_clear().
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1200018&group_id=5470
More information about the Patches
mailing list