1969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo# Reference cycles involving only the ob_type field are rather uncommon 2969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo# but possible. Inspired by SF bug 1469629. 3969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo 4969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigoimport gc 5969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo 6969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigodef leak(): 7969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo class T(type): 8969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo pass 9969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo class U(type): 10969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo __metaclass__ = T 11969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo U.__class__ = U 12969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo del U 13969ef7501c45eb4346d5c2992c9bdb69cc362438Armin Rigo gc.collect(); gc.collect(); gc.collect() 14