home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18906 < prev    next >
Encoding:
Text File  |  1993-01-10  |  816 b   |  18 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!wupost!csus.edu!netcom.com!erc
  3. From: erc@netcom.com (Eric Smith)
  4. Subject: Re: Is it possible to use 'delete this' ?
  5. Message-ID: <1993Jan10.222705.24200@netcom.com>
  6. Organization: Netcom - Online Communication Services (408 241-9760 guest)
  7. References: <rmartin.725581109@thor> <C000qE.D3J@comp.vuw.ac.nz> <rmartin.726675168@thor>
  8. Date: Sun, 10 Jan 1993 22:27:05 GMT
  9. Lines: 7
  10.  
  11. In article <rmartin.726675168@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  12. >"delete this" can only be appropriate for objects that are "always"
  13. >allocated from the heap.  Unfortunately, there is no way for an object
  14. >to insure this. 
  15.  
  16. Use a protected destructor.  There should be no compiler warning about
  17. "delete this" because it is a normal and useful feature.
  18.