Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2006-03-29 23:10:05


On 03/29/2006 05:05 PM, Peter Dimov wrote:
>
> make_shared_ptr<T>( a, b, c ) (or however we end up calling it) still has
> the advantage of being able to fold the two allocations into one.
>
I assume the two allocations are for the detached refcount and the
referent. Wouldn't placing them in the same block of memory with
a single call to new (and I assume this is what you mean by
"fold the two allocations into one") mean that shared_ptr would have
to change it's two deletes (1 for refcount and 1 for referent) into one?
IOW, make_shared_ptr would not make the current shared_ptr but
another type of smart pointer. Or am I missing something?


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