Re: Basic question C++ exception
On Jun 29, 8:28 pm, Vijay <mt.vi...@gmail.com> wrote:
> On Jun 29, 12:41 pm, Erik Wikström <Erik-wikst...@telia.com> wrote:
[...]
> Thanks. I think, because of compiler optimization, i am getting
> confused.
> one more point: in your above result, i didnt get two lines
> In Destructor // The object created by A() is destroyed
> and
> In Destructor // The exception object dies
>
> object created by A() is exception object. right?
> If no, then when exception object is created which dies in last line?
Just a note, but in such experimenting, I would recommend
outputting the this pointer in your trace output. That way, you
can easily see which destructors are for which objects.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
|