Python's object base class __del__ method
This method of Python is a destructor that executes when an instance is destroyed, destroys the memory associated with the instance, methods, attributes, and so on. Also, if the base class specifies a particular property or other method, the subclass also needs to be explicitly specified.
In general, you do not need to overwrite this method.
Python3.4 Documents:
Object. __del__ (self)
Called when the instance are about to be destroyed. This is also called a destructor. If a base class has a __del__ () method, the derived class ' s __del__ () method, if any, must explicitly call it to ensure PR Oper deletion of the base class part of the instance. The It is possible (though does recommended!) for the __del__ () method to postpone destruction of the instance by CRE Ating a new reference to it. It may then to called at a later time when this new reference is deleted. It is not guaranteed which __del__ () methods are called for objects this still exist when the interpreter exits