Destructor (computer programming) - Wikipedia In C++ CLI, which has both destructors and finalizers, a destructor is a method whose name is the class name with ~ prefixed, as in ~Foo() (as in C#), and a finalizer is a method whose name is the class name with ! prefixed, as in !Foo()
Destructors, C++ FAQ A class’s destructor (whether or not you explicitly define one) automagically invokes the destructors for member objects They are destroyed in the reverse order they appear within the declaration for the class
Destructors (C++ only) - IBM Destructors are usually used to deallocate memory and do other cleanup for a class object and its class members when the object is destroyed A destructor is called for a class object when that object passes out of scope or is explicitly deleted