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: Michael Walter <michael.walter@g...>
Subject: Re: [Caml-list] exception safety / RAII ?
On Mon, 7 Mar 2005 00:03:52 +0000, Jon Harrop <jon@jdh30.plus.com> 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).

Michael