home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06152.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-11-25  |  310.7 KB  |  1 channel  |  11,025 sample rate  |  29 seconds
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.