411 REFERENCE · Wikibooks
C++ Language/Objects/Destructors
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
If a class constructor's implementation has any side-effect (e.g., allocation of memory, or opening of a file), then you usually desire the opposite side-effect to happen whenever that class' instances are going to get destroyed.
The compiler knows when it's going to be destroying an object, but the programmer needs to specify that side-effect behavior within a "destructor" function which is written as CRType::~CRType() {body}.
Additional information about destructors