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 (03:31)
From: Michael Walter <>
Subject: Re: [Caml-list] exception safety / RAII ?
On Mon, 7 Mar 2005 00:03:52 +0000, Jon Harrop <> wrote:
> > The C++ solution to this problem
> > is a technique called Resource Acquisition Is Initialization.
> This is a poor man's alternative to garbage collection. The principal problem
> is the inability to determine what object owns which resources at any given
> point in the code.

I'm not sure one should think of it as a "poor man's" solution or an
"alternative to GC". An indication to that could be the inclusion of
"using" into C#. Another indication could be the inelegance of
finalizers (or as well the trouble people seem to have using them -- I
wouldn't blame a wrong (read: C++) context as a cause for that).