More examples ------------- Objects that have a __del__ method >>> class Nondestructible(list): ... def __del__(self): ... pass >>> x = Nondestructible() >>> y = [] >>> z = [] >>> x.append(y) >>> y.append(z) >>> z.append(x) >>> del x, y, z >>> import objgraph >>> objgraph.show_backrefs(objgraph.by_type('Nondestructible'), filename='finalizers') .. image:: finalizers.png