[Python-bugs-list] [ python-Bugs-484977 ] memory leaks with new style classes
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 27 Nov 2001 11:58:26 -0800
Bugs item #484977, was opened at 2001-11-23 12:27
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=484977&group_id=5470
Category: Type/class unification
Group: Python 2.2
>Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Thomas Heller (theller)
Assigned to: Thomas Heller (theller)
Summary: memory leaks with new style classes
Initial Comment:
This code leaks 19 references:
class X(object): pass
This code leaks 12 references:
class X(type): pass
----------------------------------------------------------------------
>Comment By: Thomas Heller (theller)
Date: 2001-11-27 11:58
Message:
Logged In: YES
user_id=11105
Guido is right - it were circular references cleaned up by
the garbage collector.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2001-11-24 10:04
Message:
Logged In: YES
user_id=33168
I just tried both lines with purify and it reported no leaks
on Solaris 8.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-11-23 18:13
Message:
Logged In: YES
user_id=6380
Which version did you try? Which tool did you use?
I observed no memory growth for this program (with 2.2b2+):
while 1:
class C(object): pass
class T(type): pass
so I conclude there's no leak.
There may appear to be a leak, but this is due to circular
references and properly taken care of by the garbage
collector.
So, back to you -- you can either close this, or provide
more information and assign it back to me.
----------------------------------------------------------------------
Comment By: Thomas Heller (theller)
Date: 2001-11-23 12:30
Message:
Logged In: YES
user_id=11105
I forgot: 2.2b2, Windows 2000, debug build.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=484977&group_id=5470