|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-10-11 07:12:05
Phil Endecott:
> Vladimir Batov wrote:
>> Given I've been using this Pimpl idiom quite extensively lately I've
>> noticed
>> writing the same scaffolding over and over again.
>
> Maybe we need something with a mixture of features from scoped_ptr and
> shared_ptr. scoped_ptr does everything that I need for a pimpl, except
> that it can't delete the incomplete implementation type. shared_ptr
> can delete the incomplete implementation, but it has the unneeded
> overhead of reference counting and thread safety issues. So, can the
> incomplete deletion feature of shared_ptr be extracted and added to
> scoped_ptr? I have just had a quick look at the shared_ptr
> implementation to see how deletion works, but it's too clever for me to
> understand....
Alan Griffiths has written a similar smart pointer, arg::grin_ptr:
http://www.octopull.demon.co.uk/arglib/TheGrin.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk