I want to a method that runs when object reference count is changed. is there a method like the following code ?
class Foo():
def __method__(self):
print("ojbect reference count is changed !")
a = Foo()
b = a # runs __method__ because the reference count is increased
c = b # runs __method__ because the reference count is increased
del b # runs __method__ because the reference count is decreased
del c # runs __method__ because the reference count is decreased
thanks.