Debian Codegraph @

cpython27/Lib/test/leakers/test_selftype.py

raw symbols SCIP
1 # Reference cycles involving only the ob_type field are rather uncommon
2 # but possible. Inspired by SF bug 1469629.
3
4 import gc
5
6 def leak():
7 class T(type):
8 pass
9 class U(type):
10 __metaclass__ = T
11 U.__class__ = U
12 del U
13 gc.collect(); gc.collect(); gc.collect()