I have a simple question about objects and exception handling.

What happens to an object after its thrown? Does the implementation take of cleaning up that object or should I be aware of any situations that may require extra care...I've read this from - Inside The C++ Object Model by Stanley B. Lippman pg 261

"When an exception is thrown, the exception object is created and placed generally on some form of exception data stack"

This is great to know but I can't find any mention of what happens to that object after the exception is finished...Could someone please enlighten me...Thanks.

I can't find any mention of what happens to that object after the exception is finished

Finished by being caught and handled, or finished by being unhandled? In the former case, the destructor is properly called and the object ends after the final exception handler completes. In the latter case, abort is called, which is a hard terminate on the program.

Edited 6 Years Ago by Narue: n/a

Finished by being caught and handled, or finished by being unhandled? In the former case, the destructor is properly called and the object ends after the final exception handler completes. In the latter case, abort is called, which is a hard terminate on the program.

I meant the former and thank-you for clearing that up

This question has already been answered. Start a new discussion instead.