Boost logo

Boost :

From: William Kempf (sirwillard_at_[hidden])
Date: 2001-01-10 11:44:53

--- 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
> > including the use of RAII harnesses, while making it much simpler
> > 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,
> > what you have in mind should be considered instead, or if both
> > pros and cons and should both be considered/accepted.
> The cyclic_ptr at
> as described at
> might fit your bill. It includes a weak_ptr as well. You
> might also like

You see, I'm not expert enough on this subject to properly evaluate
the solutions. That's why I said I don't know if the stuff in the
vault compares. I'll leave this decision up to those who know better
and just make use of the result ;).

> 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.

Bill Kmepf

Boost list run by bdawes at, gregod at, cpdaniel at, john at