A destructor is an interesting idea found in C++ and Delphi Pascal. A destructor is automatically invoked when an object is deleted. It is charged with performing whatever ``housecleaning'' tasks may be called for before an object is removed.