New submission from Daniel Stutzbach <dan...@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 4842 4850 4858 4866 4874 4882 4890 4898 4906 4914 Cashew:~$ python3.1 leak.py 4286 4273 4273 4273 4273 4273 4273 4273 4273 4273 ---------- components: Interpreter Core, Library (Lib) files: leak.py messages: 100132 nosy: stutzbach severity: normal status: open 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 <rep...@bugs.python.org> <http://bugs.python.org/issue8022> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com