|
Re: Order of Object destruction: msg#00208gcc.help
Hi Neophytos, >When the call foo(a) is made the copy constructor is called and makes a new object "z". This object "z" is supposed to be desposed off when it goes out of scope. Correct. And it does. Temporary object "z" goes out of scope at the caller's semi-colon. Returned object "b" also goes out of scope at the caller's semi-colon. >I was asking which was supposed to be desposed of first "z" or "b"? I think it is up to the discretion of the compiler's vendor whether it's a LIFO object destruction at the semi-colon, or FIFO object destruction. Sincerely, --Eljay |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Order of Object destruction: 00208, Neophytos Michael |
|---|---|
| Next by Date: | Converting from gcc-2.96 to gcc-3.2.2: 00208, John McClurkin - LMO |
| Previous by Thread: | Re: Order of Object destructioni: 00208, Neophytos Michael |
| Next by Thread: | Re: Order of Object destruction: 00208, LLeweLLyn Reese |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |