Re: Segmentation fault on closing file in destructor

2010-09-28 Thread Tom Kazimiers
Hi, On 09/27/2010 02:09 PM, Steven Schveighoffer wrote: > On Sun, 26 Sep 2010 20:20:18 -0400, Michel Fortin >> In fact, it's generally a good idea to not wait for the GC to collect >> your objects before closing files, because waiting for the GC could >> take an indeterminate amount of time and le

Re: Segmentation fault on closing file in destructor

2010-09-28 Thread Tom Kazimiers
Hi, On 09/26/2010 10:05 PM, Simen kjaeraas wrote: >>> 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 r

Re: Segmentation fault on closing file in destructor

2010-09-28 Thread Tom Kazimiers
Hi Jérôme, On 09/26/2010 10:59 PM, "Jérôme M. Berger" wrote: > The way I see it, there are two possible situations: > > 1. You really need precise control as to when the file is closed. In > that case, your class contains an explicit cleanup function that you > call before dropping the last