Files
Android11/external/python/cpython2/Lib/test/leakers/test_dictself.py
2023-10-13 14:01:41 +00:00

13 lines
232 B
Python

'''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()