Subject: Re: [boost] [interest] rich-typed smart pointers
From: Julian Gonggrijp (j.gonggrijp_at_[hidden])
Date: 2013-10-07 11:36:06
Jonathan Wakely wrote:
> On 7 October 2013 14:34, Julian Gonggrijp wrote:
>> Of course a programmer can avoid the problem by doing the right thing.
>> That's not what my paragraph above was about. As I stated in the
>> follow-up, the same reasoning applies to the rtp pointers.
> Does it? How do I tell if an rtp::weak_ptr is dangling or not?
> You seem to be claiming that because sloppy programmers can forget to
> check a std::weak_ptr for validity that it's no safer than a type that
> doesn't even support such checking for validity. [...]
>> Please note that I'm not disputing that reference counting has a clear
>> advantage to single ownership in cases like these. I'm just saying
>> that dangling or expired pointers can still be a pitfall despite that
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk