[New-bugs-announce] [issue8022] Leak when creating certain classes that subclass ABCs
report at bugs.python.org
Fri Feb 26 03:17:54 CET 2010
New submission from Daniel Stutzbach <daniel at stutzbachenterprises.com>:
Attached is a minimal example. It has a function called leak(). The end of the script calls that function, runs the garbage collector, and prints out the number of objects in the system. In Python 2.6, the number of objects increases after each iteration of the loop. In Python 3.1, the number of objects remains fixed after the second iteration. I don't have a Python 2.7 branch handy to test.
The problem could lie in the C code or perhaps ABCMeta is keeping a reference? I'm not sure.
Cashew:~$ python2.6 leak.py
Cashew:~$ python3.1 leak.py
components: Interpreter Core, Library (Lib)
title: Leak when creating certain classes that subclass ABCs
type: resource usage
versions: Python 2.6
Added file: http://bugs.python.org/file16374/leak.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce