Thread View: comp.std.c++
1 messages
1 total messages
Started by scott douglass
Mon, 21 Aug 1995 16:50
When do thrown objects get destroyed?
Author: scott douglass
Date: Mon, 21 Aug 1995 16:50
Date: Mon, 21 Aug 1995 16:50
31 lines
1515 bytes
1515 bytes
Distribution:
[I hope I'm not bringing up something that's been discussed recently. I
tried to post this before and it never showed up. Perhaps it was
accidentally routed 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
--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