class TestClass(object):

    def bark(self):
        print('woof!')

def __del__(self):
    print('destructor called')
x = TestClass()
b = weakref.proxy(x)
b
b.bark()
del x
How to delete every reference of an object in Python?