|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-18 08:56:28
----- Original Message -----
From: "Carl Daniel" <cpdaniel_at_[hidden]>
> "David B. Held" <dheld_at_[hidden]> wrote in message
> news:a9limo$9jc$1_at_main.gmane.org...
> > I have uploaded
> http://groups.yahoo.com/group/boost/files/intrusive_ptr.hpp,
> > which is an implementation of an intrusive reference-counted
> > smart pointer that was shamelessly copied from boost::shared_ptr.
>
> A couple of comments: I, like you, need to create smart pointers from
this
> frequently, and I also dislike the separate allocation of the
reference
> count.
Me too; at least I dislike the unoptimized allocation of two reference
counts. It violates "don't-pay-for-what-you-don't-use".
> In fact, I've stayed away from boost::shared_ptr entirely for those
> reasons
I haven't: fact is, it works!
> & instead rolled my own intrusive ref-counted pointer several times.
>
> Maybe it's just my COM background influencing me... but this strategy
has
> worked very well for me in many large projects.
There's no arguing with what works. This is one reason we really need to
get a policy-based smart pointer into boost. While I think it's
unreasonable for any one person to take on being a project "lead" for
integrating all of Loki, this is one piece which would be incredibly
valuable, and, I believe, feasible. I don't think it needs to be a
veteran Booster; it's much more important that the person have a
personal stake in the project (i.e. needs the functionality for his own
work). I hope that someone (like you ;->) will take Andrei up on it.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk