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
13 lines
232 B
4 months ago
|
'''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()
|