Boost logo

Boost :

Subject: Re: [boost] Looking for thoughts on a new smart pointer: shared_ptr_nonnull
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-10-09 10:39:29


On 9 October 2013 04:33, Rob Stewart <robertstewart_at_[hidden]> wrote:

>
>
> Functional style programming and careful use of RAII are ways to ensure
> proper cleanup during unwinding, but they require the kind of careful
> programming that would have inserted a conditional to test for a null
> pointer.
>

Even careful programming can't address it, as you would still have to
assume that the *only* programming bug was the null pointer. Without doing
a root cause analysis, running any code that makes an assumption about
state, including destructors, is suspect.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

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