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