home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!pipex!warwick!bham!bhamvx!mccauleyba
- From: mccauleyba@vax1.bham.ac.uk (Brian McCauley)
- Subject: Re: Self Deletion
- Sender: usenet@rs6000.bham.ac.uk (USENET News Service)
- Message-ID: <1992Nov23.182513.1@vax1.bham.ac.uk>
- Date: Mon, 23 Nov 1992 18:25:13 GMT
- Lines: 16
- References: <1992Nov20.221751.2482@crd.ge.com>
- Organization: University of Birmingham
-
- In article <1992Nov20.221751.2482@crd.ge.com>, jim@galifrey (Jim Weirich) writes:
- [...]
- > The most straight forward way is have the window object delete
- > itself by saying "delete this;" inside the member function handling
- > the CLOSE button. This seems to work, but I wonder if it is proper to
- > delete an object while executing one of its member functions.
-
- Self deletion is not uncommon in C++ so if it's unsafe I'd be very supprised.
- (Execpting of course the usual hazards with delete ;-> )
- --
- \\ ( ) No Bullshit! | Email: B.A.McCauley@bham.ac.uk
- . _\\__[oo from | Voice: +44 21 471 3789 (home)
- .__/ \\ /\@ /~) /~[ /\/[ | Fax: +44 21 625 2175 (work)
- . l___\\ /~~) /~~[ / [ | Snail: 197 Harborne Lane,
- # ll l\\ ~~~~ ~ ~ ~ ~ | Birmingham, B29 6SS, UK
- ###LL LL\\ (Brian McCauley) | ICBM: 52.5N 1.9W
-