home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!sun-barr!decwrl!pa.dec.com!brister
- From: brister@decwrl.dec.com (James Brister)
- Subject: delete this;
- Message-ID: <BRISTER.92Jul23172945@sausalito.decwrl.dec.com>
- Sender: news@PA.dec.com (News)
- Organization: DEC Western Software Lab
- Date: 23 Jul 92 17:29:45
- Lines: 17
-
- Is that legal? Opinion around here is that it's OK as long as it's the last
- thing I do in the method (i.e. I don't try to access any data inside the
- object).
-
- The situation is that I have a referrence count in an object, and I want to
- do obj->decrementRefCount(); and if the ref count drops to zero, then
- have the object get deleted (rather than force the function calling
- decRefCount to check for this and call delete itself).
-
- Possible problems?
-
- Thanks
-
- James
- --
- James Brister brister@wsl.pa.dec.com
- DEC Western Software Lab., Palo Alto, CA decwrl!brister
-