Segmentation fault on closing file in destructor

Simen kjaeraas simen.kjaras at gmail.com
Sun Sep 26 13:05:46 PDT 2010


Tom Kazimiers <2voodoo at gmx.de> wrote:

> Hi,
>
> On 09/26/2010 07:13 PM, bearophile wrote:
>> Tom Kazimiers:
>>
>>> Do you have any suggestion how I should make
>>> sure that the file gets closed on destruction?
>>
>> Can you use scope(exit) or the std.stdio.File?
>
> Well, I have no idea. You mentioning scope(exit) was actually the first
> time I heard of it. Unfortunately I have not found any resource about
> it. Do you have a link to point me in the right direction?

http://digitalmars.com/d/2.0/statement.html#ScopeGuardStatement


-- 
Simen


More information about the Digitalmars-d-learn mailing list