__del__()
If a class has a .__del__() method, that method is called when an instance is deleted. For details, see Section 26.1.5, “Instance deletion: the destructor, .__del__()”.
.__del__()