$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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
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.
>
> The cyclic_ptr at www.boost.org/libs/smart_ptr/smarttest.zip
> as described at www.boost.org/libs/smart_ptr/smarttests.htm
> might fit your bill. It includes a weak_ptr as well. You
> might also like www.egroups.com/files/boost/GarbageCollector/
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