From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-03-04 05:10:24
Davide Bolcioni wrote:
> On Sunday 04 March 2007 02:40:20 Braddock Gaskill wrote:
>> A nice discussion of the aliasing concept can be found in the paper
>> "Improving Usability and Performance of TR1 Smart Pointers, N1851" by
>> Kliatchko and Rocha. It can be found at:
>> I believe this is the proposed aliasing extension to TR1 smart_ptr
>> that was mentioned earlier.
> Reading n1851, a thought comes to mind: maybe TR1/Boost should change
> shared_ptr to accept an optional *allocator* instead of an optional
> *deleter* and fold the deleter case into the concept of allocator ?
The two concepts are distinct. The deleter is used to delete the pointer you
pass to shared_ptr. The allocator is used for the internal allocation and
deallocation of the control block (which holds the reference counts.)
boost::shared_ptr already supports the allocator constructor, BTW; I'm not
sure whether it's in 1.34, though.