Version française
Home     About     Download     Resources     Contact us    
Browse thread
exception safety / RAII ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefan Monnier <monnier@i...>
Subject: Re: exception safety / RAII ?
>> Very bad practice [...]
[...]
> I very rarely have problems with this.

Very rarely having problems with something can't save it from being
a very bad practice.  Not explicitly closing your files is (in 99% of the
cases) just sloppy coding.  Kinda like letting a GC finalizer close
your windows: when the effect is visible from outside the process it
shouldn't be done in a finalizer.


        Stefan