|
Boost : |
From: William Kempf (sirwillard_at_[hidden])
Date: 2001-01-10 12:28:21
--- In boost_at_[hidden], "Greg Colvin" <greg_at_c...> wrote:
> ----- Original Message -----
> From: William Kempf <sirwillard_at_m...>
> > --- In boost_at_[hidden], "Greg Colvin" <greg_at_c...> wrote:
> > > From: William Kempf <sirwillard_at_m...>
> > > > That said, I would be very interested in a smart pointer that
> > > > performed similarly to a full blown GC. In fact, I'd prefer
this
> > > > over a real GC. It would give me complete control when I
needed it,
> > > > including the use of RAII harnesses, while making it much
simpler to
> > > > program some constructs in which memory management is the
hardest
> > > > issue to deal with. So my personal vote would be for such a
> > > > submission. I don't know if the circ_ptr in the vault
qualifies, if
> > > > what you have in mind should be considered instead, or if
both have
> > > > pros and cons and should both be considered/accepted.
> > ...
> > > And what is an RAII harness?
> >
> > Resource Acquisition In Initialization. It's the principle
behind
> > std::auto_ptr and numerous other C++ constructs. RAII is not
> > possible (or feasable, at least) in garbage collected languages
> > because you don't know when (or if) the object will be
collected. So
> > even if such a language included destructors (most don't) you
rarely
> > can make use of RAII harnesses.
>
> You mean "resource acquisition IS initialization"?
I've seen both words used for the third initial. I *believe* the
first time this term was coined the word IS was used, but frankly, IN
makes more sense to me.
> I'm very
> familiar with auto_ptr, but I still don't what you mean by
> "harness".
Classes whose sole purpose is to add RAII to a concept are often
referred to as "RAII harnesses". Whether the term "harness" is
generally accepted in the C++ vernaculor, I'm not sure, but "RAII
harness" has been used often enough I thought anyone familiar with
RAII would know what was meant. Granted, I really meant RAII in
general, so I should have been more careful in my wording. Sorry for
any confusion.
Bill Kempf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk