David Abrahams wrote:
> Gregory Colvin <[EMAIL PROTECTED]> 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
think.

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
wrong. :-)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to