Search notes:

Python objects: reference counter

The value of an object's reference counter can be determined with sys.getrefcount(obj).
When an object's reference counter reaches zero, the object's __del__() method is called.
The module weakref allows to point to objects without incrementing their reference counter.

See also

Using ctypes to get an object's reference counter

Index