historical/toontown-classic.git/panda/python/Lib/test/leakers/test_dictself.py

13 lines
232 B
Python
Raw Normal View History

2024-01-16 17:20:27 +00:00
'''Test case for "self.__dict__ = self" circular reference bug (#1469629)'''
import gc
class LeakyDict(dict):
pass
def leak():
ld = LeakyDict()
ld.__dict__ = ld
del ld
gc.collect(); gc.collect(); gc.collect()