Subject: Re: [boost] [smart_ptr] Interest in the missing smart pointer (that can target the stack)
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2016-01-30 22:12:24


On Sat, Jan 30, 2016 at 2:20 AM, Rob Stewart <rob.stewart_at_[hidden]>
wrote:

> On January 29, 2016 3:35:54 PM EST, Emil Dotchevski <
> emildotchevski_at_[hidden]> wrote:
> > The point of null deleter is specifically to be able to use shared_ptr
> > in
> > cases when it isn't possible for shared_ptr to control the lifetime of
> > the
> > object. I don't think of the lack of safety as a disadvantage, it's a
> > feature.
>
> I wouldn't go that far, but you're right that it's an example of "trust
> the programmer."
>

OK, don't go that far :) but regardless, we've deduced that my example
shows proper use of null_deleter, in fact there is no other use case for
null_deleter except to do just this, given that we're in agreement that its
use with global objects is not safer than its use with local objects.

Emil