home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!kirk!ptcburp!michi
- From: michi@ptcburp.ptcbu.oz.au (Michael Henning)
- Subject: Re: Is it possible to use 'delete this' ?
- Message-ID: <1992Dec23.235809.20778@ptcburp.ptcbu.oz.au>
- Organization: Pyramid Technology Corporation
- References: <Dy93VB2w165w@bwhwob.escape.de> <rmartin.725129268@thor> <BzqE5s.6Lr@comp.vuw.ac.nz>
- Date: Wed, 23 Dec 1992 23:58:09 GMT
- Lines: 39
-
- robertd@kauri.vuw.ac.nz (Robert Davies) writes:
-
- >rmartin@thor.Rational.COM (Bob Martin) writes:
- >>bernd@bwhwob.escape.de (Bernd Wiegmann) writes:
- >>
- >>>Hi,
- >>
- >>>Is it possible to use 'delete this' as the last statement in a
- >>>method of a class ?
- >>
- >>In general, "delete this" is a bad idea.
- >> .........
-
- >This is the standard argument - but I suspect it is not necessarily the
- >correct one.
-
- >I agree that "delete this" could be very confusing in a function likely to
- >be used by others (or oneself, sometime in the future), but for a function
- >that is only for internal use by one's package, probably declared private
- >and properly documented, there doesn't seem to be a problem.
-
- >The danger with the statements that "delete this" is not a good idea is
- >that the compiler writers or standards committee will listen and a very
- >useful construct (in some situations) will be lost.
-
-
- There is already precedence for delete(this), in the C++ task library.
- Since Bjarne was involved in writing the code for this one, I would
- expect the standard to sanction it :-)
-
- The reference manual, section 5.3.4, says nothing to prohibit it.
-
- Michi.
-
- --
- -m------- Michael Henning +61 75 950255
- ---mmm----- Pyramid Technology +61 75 722475 FAX
- -----mmmmm--- Research Park, Bond University michi@ptcburp.ptcbu.oz.au
- -------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA uunet!munnari!ptcburp.oz!michi
-