Destructors are used to destruct instances of classes.
Destructors cannot be defined in structures, they are only used with classes.
A class can only have one destructor.
Destructors cannot be inherited or overloaded.
Destructors cannot be called, they are invoked automatically.
A destructor does not take modifiers or have parameters.
~ Car() // destructor
// cleanup statements...
Found interesting? Add this to: