|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-05 15:14:06
From: "Sean Parent" <sparent_at_[hidden]>
> Perhaps I'm wrong - but my read of shared_ptr leads me to believe that if
I
> have a special function to delete my pointer then I need to either
> specialize shared_deleter<> or, I suppose, overload checked_delete<>().
>
> Further - if I have an allocator that requires instance data I have no way
> to provide that to shared_ptr.
shared_ptr in shared_ptr_updates.zip has a constructor of the form
template<class D> shared_ptr<T>::shared_ptr<T>(T * p, D d);
that takes an arbitrary "deleter" function object (except that its copy
constructor must not throw.)
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk