Boost logo

Boost :

From: William Kempf (sirwillard_at_[hidden])
Date: 2001-01-10 09:47:10


--- In boost_at_[hidden], "Larry Evans" <jcampbell3_at_p...> wrote:
> The testdriver code and output from solutions to both the circular
> reference-counted pointer problem and to dangling references can be
> found from the home following page:
>
> http://sites.netscape.net/cppljevansusa/homepage
>
> I've noticed there's some work being done in boost in this
> area (http://www.egroups.com/files/boost/circ_ptr.zip). I
> think I could contribute here, and I'm finishing up html file
> describing the solution. Email me if your interested in
> getting a copy when I'm done, or maybe I should just submit it
> for review by boost?

Again, from long experience with this problem in C++ I've grown the
habit of just avoiding this problem by not using smart pointers in
the cases where I've had circular references. I realize that this
isn't always possible and that others will have different experiences
here.

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.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk