[Python-bugs-list] [ python-Bugs-484977 ] memory leaks with new style classes

noreply@sourceforge.net noreply@sourceforge.net
Fri, 23 Nov 2001 18:13:29 -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: Open
>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: 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