Boost logo

Boost :

Subject: Re: [boost] [shared_ptr] delete shared_ptr
From: Eric J. Holtman (eric_at_[hidden])
Date: 2011-03-18 12:19:53


On 3/18/2011 11:11 AM, Kenny Riddile wrote:

>>
>> having "delete p" do *anything other* than p = 0
>> for a smart pointer would be suicidal.
>
> That actually kind of sounds like the exact opposite of what I said :)
>

Well, you elided my second point. My point was, clearly,
that "delete p" can't really call delete.

So, the only thing it can do is the equivalent of "p.reset".

And I was arguing for just using "p.reset" (which I prefer
over "p=0", because it's easier to search for)


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