June 28, 2013 Re: Scope of temporaries as function arguments | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | On 06/28/2013 10:53 AM, monarch_dodra wrote: > On Friday, 28 June 2013 at 17:30:58 UTC, Ali Çehreli wrote: >> 1) C++ does not specify whether the stack gets unwound when the >> program terminates with an uncaught exception. That's why I caught to >> ensure that the stack objects would be destroyed. > > Doesn't it? The stack needs to be unwound for the exception to even > "escape". It's merely the globals that may not be destroyed. (AFAIK) The standard does not specify it. On Linux, abort() gets called causing a core dump, which may be more useful than executing the destructors. Ali |
Copyright © 1999-2021 by the D Language Foundation