Boost logo

Boost :

Subject: Re: [boost] [interest] rich-typed smart pointers
From: Larry Evans (cppljevans_at_[hidden])
Date: 2013-10-06 17:26:21


On 10/02/13 13:34, Julian Gonggrijp wrote:
> Dear Boost members,
>
> I have designed a smart pointer that relies on the type system to
> offer safe and flexible automatic memory management at no runtime
> cost. It combines single ownership as in std::unique_ptr and reliable
> access from multiple places as in std::shared_ptr with some additional
> features. I believe it to be about as safe and practically useful as a
> smart pointer in C++11 could get.
[snip]
When the attached dangling_ptr.cpp driver is run (using the
also attached obj_id.cpp), the output (last attachment)
indicates the weak_ptr is accessing a dangling pointer.
Refcounted smart pointers (such as boost::shared_ptr),
would not allow that, IIUC.

Am I missing something?

-regards,
Larry






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