[Python-bugs-list] [ python-Bugs-708806 ] memory leak in nested def()
SourceForge.net
noreply@sourceforge.net
Mon, 24 Mar 2003 05:42:46 -0800
Bugs item #708806, was opened at 2003-03-24 14:42
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=708806&group_id=5470
Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 7
Submitted By: Christian Tismer (tismer)
Assigned to: Nobody/Anonymous (nobody)
Summary: memory leak in nested def()
Initial Comment:
I just tested generators and found a memory leak.
(Has nothing to do with generators).
The following code adds one to the overall refcount
and gc cannot reclaim it.
def conjoin(gs):
def gen():
gs # unbreakable cycle
gen # unless one is commented out
The above holds for Python 2.2.2 upto the current CVS
version. I didn't try yet to investigate this further.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=708806&group_id=5470