|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-01-31 11:37:33
"David B. Held" <dheld_at_[hidden]> writes:
> "Peter Dimov" <pdimov_at_[hidden]> wrote in message
> news:009501c2c923$b4de48a0$1d00a8c0_at_pdimov2...
>> [...]
>> shared_ptr keeps a copy of p in the "ownership policy" (the count
>> structure.) Its "storage policy" (px) doesn't own the pointer. But I may
>> be misunderstanding the context.
>
> Well, if *I* understand correctly, you have a "fat count". But since it
> is shared among pointers, it's a constant cost per object. I thought
> Dave A was talking about storing p multiple times *per pointer*.
> That's what I thought was really fat.
Yes, that's what I meant, and I wasn't suggesting that you do it. I
meant that if your other design choices weren't forcing you to do it,
you probably had a pretty efficient smart_ptr.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk