home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06152.TXT < prev    next >
Encoding:
Text File  |  1993-11-23  |  467 b   |  9 lines

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