|
Boost : |
Subject: Re: [boost] [shared_ptr] delete shared_ptr
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-03-17 15:37:12
pavel wrote:
> Kenny wrote on Thursday, March 17, 2011 at 22:08:51:
> > On 3/17/2011 2:13 PM, pavel wrote:
>
> >> and at last can you please give a couple of reasons why
> >> delete'ing smart pointers is a bad idea?
>
> > Because it's a lie. "delete" should delete something, and
> > not be overloaded to perform non-obvious, unrelated logic.
> > A perfect example is how the proposed usage of "delete"
> > confused Frank Mori Hess. Was it unreasonable for him to
> > see "delete" and assume that it was actually deleting
> > something?
>
> i disagree with you
> in my view it perfectly fits
> and i believe Frank just misread my message
I completely agree with Kenny. The pointer isn't deleted. "delete" has very specific semantics and you are changing those to be something nebulous along this line: cannot be referenced any longer in this scope, whatever affect it may have on other code or the resource.
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk