From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-09-02 16:30:36
David Abrahams wrote:
> Gregory Colvin <gregory.colvin_at_[hidden]> writes:
>>> Also, if shared_ptr only needs to allocate at construction time (I'm
>>> not sure of this) we can avoid storing the allocator at all.
>> Then how to deallocate?
> Using the custom deleter?
The deleter takes care of the pointee, but we are talking about the count. I
I still find the
list< shared_ptr<X> >
hypothetical example where everything needs to use the same custom allocator
somewhat artificial. In "custom allocator" situations I find
vector< X* >
a somewhat better choice since it has much less overhead. But I may be
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk