scope(exit) without exception handling?

Walter Bright newshound2 at digitalmars.com
Tue May 15 23:59:48 PDT 2012


On 5/15/2012 8:54 PM, Mehrdad wrote:
> Is there any way for me to use scope(exit) (or perhaps a destructor, like RAII)
> to mean, "Execute this block of code for me when the block is exited, will ya?",
> *without* introducing dependencies on exception handling?

Make sure the guarded code is 'nothrow', and it should work.


More information about the Digitalmars-d mailing list