Transcription: If a class constructor allocates dynamic memory for an object, the destructor should explicitly deallocate that memory. The class destructor should make sure all the finite system resources used by the object are released. It should never leave loose ends that might cause problems for the client code. For example, the destructor might flush an output buffer or record some transaction logging information. Destructors can also be useful debugging aids.