[issue34042] Reference loss for local classes

Serhiy Storchaka report at bugs.python.org
Wed Jul 4 09:29:17 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

The simplest reproducer:

import gc, sys
for i in range(100):
    class A:
        pass
    del A
    c = gc.collect()
    del c
    print(sys.gettotalrefcount())

----------
nosy: +pitrou, vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34042>
_______________________________________


More information about the Python-bugs-list mailing list