Sindbad~EG File Manager

Current Path : /proc/2508182/root/usr/src/Python-3.12.7/Lib/test/leakers/
Upload File :
Current File : //proc/2508182/root/usr/src/Python-3.12.7/Lib/test/leakers/test_selftype.py

# Reference cycles involving only the ob_type field are rather uncommon
# but possible.  Inspired by SF bug 1469629.

import gc

def leak():
    class T(type):
        pass
    class U(type, metaclass=T):
        pass
    U.__class__ = U
    del U
    gc.collect(); gc.collect(); gc.collect()

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists