This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, kaizhu
Date 2011-05-14.07:55:54
SpamBayes Score 1.7137071e-07
Marked as misclassified No
Message-id <1305359755.21.0.654571655672.issue12075@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-05-14 07:55:55ezio.melottisetrecipients: + ezio.melotti, kaizhu
2011-05-14 07:55:55ezio.melottisetmessageid: <1305359755.21.0.654571655672.issue12075@psf.upfronthosting.co.za>
2011-05-14 07:55:54ezio.melottilinkissue12075 messages
2011-05-14 07:55:54ezio.melotticreate