Boost logo

Boost Users :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-12-22 08:49:17


John Maddock wrote:
> Tobias Schwinger wrote:
>> If we use a custom Allocator we'll also need a custom Smart Pointer
>> that uses this Allocator. None of our Boost Smart Pointers support
>> Allocators and the Factory should actually initialize a stateful
>> Allocator within a Smart Pointer that does.
>
> Doesn't shared_ptr support a custom deleter? A custom deleter is just an
> allocator by another name/interface IMO...

Thanks!

Well, this feature of 'shared_ptr' sets the situation into a different
light (is it new?)...

I'm considering a (partial) specialization for the Allocator template
parameter, assuming a second constructor parameter for Smart Pointers in
case 'Allocator' is not void (figuring 'std::allocator' is still an
Allocator and should be treated as such).

Regards,
Tobias


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net