You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
232 B

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