Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2003-12-12 09:57:59


On 12/12/2003 08:25 AM, Larry Evans wrote:
> On 12/12/2003 07:57 AM, Peter Dimov wrote:
>
>> David B. Held wrote:
[snip]
> but then the whole point of using smart_ptr's is that
> the programmer does NOT KNOW which pointer will be the
> last to be destructed. Of course maybe it wouldn't be

But I can see another point. Maybe David's implicit point was that
the programmer shouldn't have to pay for what he doesn't use, i.e. the
extra memory in shared_ptr, and the programmer is willing to impose on
himself the discipline of either using virtual DTOR's or assuring the
last ~smart_ptr call is for the most derived class. This of course is
precisely the advantage of policy pointers, i.e. the programmer has a
greater ability to tailor the smart_ptr to his needs.


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