Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-08-17 09:21:21


At 08:44 AM 8/17/2001, Peter Dimov wrote:
>From: "Murray Cumming" <murrayc_at_[hidden]>
>> I'd like to use the shared_ptr smart pointer, but the underlying types
>> that I am using have their own specific *_alloc() and *_drop()
functions
>> instead of using new/delete.
>
>Another mandatory link to
>
>http://groups.yahoo.com/group/boost/files/smart_ptr/
>
>The variant in shared_ptr_updates.zip can do
>
>shared_ptr<my_type> p(my_alloc(), &my_drop);
>
>You only need to convince Beman that this is a good idea. :-)

I'm sorry, I haven't looked at it. Lack of time. Try convincing Greg.

Generally I don't like explicitly exposed allocators; they haven't met
expectations. A smarter implementation of shared_ptr<> should probably use
a pool allocator internally, however.

--Beman


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