Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2005-03-07 (14:39)
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.