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.
25 lines
317 B
25 lines
317 B
2 years ago
|
import gc
|
||
|
|
||
|
class old_style_class():
|
||
|
pass
|
||
|
class new_style_class(object):
|
||
|
pass
|
||
|
|
||
|
a = old_style_class()
|
||
|
del a
|
||
|
gc.collect()
|
||
|
b = new_style_class()
|
||
|
del b
|
||
|
gc.collect()
|
||
|
|
||
|
a = old_style_class()
|
||
|
del old_style_class
|
||
|
gc.collect()
|
||
|
b = new_style_class()
|
||
|
del new_style_class
|
||
|
gc.collect()
|
||
|
del a
|
||
|
gc.collect()
|
||
|
del b
|
||
|
gc.collect()
|