[Python-bugs-list] [ python-Bugs-678739 ] Leak
SourceForge.net
noreply@sourceforge.net
Sat, 01 Feb 2003 13:01:39 -0800
Bugs item #678739, was opened at 2003-02-01 17:54
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=678739&group_id=5470
Category: None
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Nobody/Anonymous (nobody)
Summary: Leak
Initial Comment:
I haven't had time to trace down the cause yet, but
the attached code fragment reveals a leak for
recursive calls in an inner function definition, inside a
method definition.
----------------------------------------------------------------------
Comment By: Michael Stone (mbrierst)
Date: 2003-02-01 21:01
Message:
Logged In: YES
user_id=670441
hmmm.... Is this really a leak?
try the following:
def reftest():
prrefs = sys.gettotalrefcount()
for i in xrange(2000):
a = x.f(4)
nref = sys.gettotalrefcount()
if nref < prrefs:
print prrefs, nref, i
prrefs = nref
shows that every few hundred iterations or so, the refcount drops drastically. Somehow it's getting cleaned up every once in a while. Over many many runs, I see no leak in the long term.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=678739&group_id=5470