Ezio Melotti <ezio.melo...@gmail.com> added the comment: I think this has to do with class attributes and reload():
wolf@hp:~/dev/py/py3k$ cat leak.py class Foo: pass Foo.l = list(range(65535)) wolf@hp:~/dev/py/py3k$ ./python Python 3.3a0 (default:4b122cac7ac5+, May 14 2011, 10:01:13) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import imp, leak; imp.reload(leak) <module 'leak' from 'leak.py'> [189091 refs] >>> imp.reload(leak) <module 'leak' from 'leak.py'> [254649 refs] >>> imp.reload(leak) <module 'leak' from 'leak.py'> [320207 refs] >>> imp.reload(leak) <module 'leak' from 'leak.py'> [385765 refs] >>> import gc; gc.collect() 28 [123927 refs] However calling gc.collect() explicitly seems to fix the problem. ---------- nosy: +ezio.melotti versions: +Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12075> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com