Thread View: comp.std.c++
1 messages
1 total messages
Started by scott douglass
Sat, 19 Aug 1995 06:46
When do thrown objects get destroyed?
Author: scott douglass
Date: Sat, 19 Aug 1995 06:46
Date: Sat, 19 Aug 1995 06:46
25 lines
1498 bytes
1498 bytes
[I hope I'm not bringing up something that's been discussed recently. I tried to post this once before and it never showed up. Perhaps it was accidentally moderated into oblivion.] I just re-read clause 15 of the draft working paper (and searched the rest) and the only near-mention of when thrown objects (exceptions) get destroyed was in 15.1: "The temporary persists as long as there is a handler being executed for that exception." I think this implies the exception object will be destroyed when a handler for it finishes without rethrowing the exception. I would also expect undefined behavior if the destructor for the exception tried to rethrow the exception (i.e. 'throw;'). The compilers I've tested seem to never destroy the exception object for a handled exception. Would you agree that these compilers are wrong? Thanks for your time, --scott --- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads