220 28946 <72ad1e5d-b7c0-414e-a9a1-ac56a43dd51c@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: mihailnajdenov@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Is World's Dumbest Pointer still on the table?!?
Date: Tue, 18 Oct 2016 10:02:47 -0700 (PDT)
Lines: 87
Approved: news@gmane.org
Message-ID: <72ad1e5d-b7c0-414e-a9a1-ac56a43dd51c@isocpp.org>
References: <8a6731f7-1c9b-482d-817e-c2374fc9ae1b@isocpp.org>
 <nu53qp$lvv$1@blaine.gmane.org> <7d817482-e7c3-4724-9501-738d4c9083d7@isocpp.org>
 <CAFk2RUYggLMwivpFr+thZmRBUXBgXC283iwAvyRQEnbT7xrqUA@mail.gmail.com>
 <f3d2848e-56f7-4ddd-a0a0-1a8c7b8db391@isocpp.org> <CAOHCbiskO5DpTwym8nH=yra+Ypa-+b-ycfSV+34JLjPqC8ST4g@mail.gmail.com>
 <4d9aa487-c824-490a-ae3a-ac90e2a2db3d@isocpp.org> <CAFk2RUZC6anr-MkMA37H3LKM235Uxh0Y6z58KyvRK-4h3R6+Rw@mail.gmail.com>
 <080a6163-4350-4246-a2d6-a3ae7f6db473@isocpp.org>
 <CAFk2RUandxAXbCfBrF5VuuZif=Z8Y__OqDWZpTbaHEjyAPQNQA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_154_868948009.1476810167308"
X-Trace: blaine.gmane.org 1476810174 14727 195.159.176.226 (18 Oct 2016 17:02:54 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Tue, 18 Oct 2016 17:02:54 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCUJ3A7GRAPRBONLTHAAKGQEAQ3ON6Q@isocpp.org Tue Oct 18 19:02:49 2016
Return-path: <std-proposals+bncBCUJ3A7GRAPRBONLTHAAKGQEAQ3ON6Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f72.google.com ([209.85.214.72])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCUJ3A7GRAPRBONLTHAAKGQEAQ3ON6Q@isocpp.org>)
	id 1bwXmq-000331-7Q
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Oct 2016 19:02:48 +0200
Original-Received: by mail-it0-f72.google.com with SMTP id z65sf4916041itc.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Oct 2016 10:02:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=XnNFQILrb0qdp7h58S5+pQcchlejJkw2DHKbeH8oTEY=;
        b=PgqaAXu5lctUXRRVQ/fBKf00BcgcOD3rl635xw88XY3Zz0/brYrS3sV8SMEjFkIeQW
         Yr8l2Rshq4p9sws9CmihkhVmHRgojbZqAqrvLBOfM2MPB8qTCQNgB/NgDd5BqZNszfZ5
         lLoO6vNFO11bxmDqw+k6Mr5DLB7wWO7Sivc4f7AIHhZ23dpUoFIoJeZMu+DsN7IKZtrw
         1lM7jacQNfXQF7MShnprS85g8NP6C9LeG/XgnJqiTyZZUcZ/6LorxRmxgdvn9RFws80j
         R+XmDv0frmEZvLybjnavRP3vyMMiHgXZYyo0g2xeqeeDgIKzL4X4WNxLZlvTc9OPoIYK
         Uitg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=XnNFQILrb0qdp7h58S5+pQcchlejJkw2DHKbeH8oTEY=;
        b=h1VDnMrOEKrxOfrnew1p3gIxw+bdqp/+J4w0b5VsHG0ZCxtOUK4FbFG4Vr2G4fndxU
         onNVQv3LeAJsjUG/4dZSktXZ8ub0hmM3jCaU9GNHq+wlMg/9nfooZuUm6Zr79esVDMq3
         lGrZl9Q9DW9O+7+Lvl1UBajKfwc5uPL57BAVr2I54nust91oYcw4L5/NDykont071W4B
         cTLNZmz+YflElMt/QYzvzDk63bvsxkDI1rCSTjhwrXUdkuQVe4YnRyuKBW+fB94ETA/U
         ghk8f7hsMfQU3XsZUH2mvtcwKmWLv2gt40KQdMaHKCLt23MWHByUUySKhd+E6FrCsjGL
         fWPw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=XnNFQILrb0qdp7h58S5+pQcchlejJkw2DHKbeH8oTEY=;
        b=QgsmilsBjdVFegxatoufwmuejCxVTmht1rGMqlcx6WlXE04wspIBTHDtM3a/yaW5tv
         yA91iNu6OQ7w+ZVzsoj8gBZffVFQs6Oqh0qp/DXfUBrVONT5Zrr8ywT3f6xVaA4+//TR
         RbG45W8pfs4RqKvt4f3drQunEB8pilDOt/iHHSxiVlG+L+/RpeMahWs3BAPoD8aQc7ol
         9igqkYsYPzsjnVibQ6gNRrcBxmS2Z13GmR2E87wUUTQB2YsGgrjgRENId4kpYPyUwsqO
         UM+oqx8iOcvgDT/avys/fiLJEMhobYhsGm7Ue9NfBTRw07p9fNp0345bQ2tkY1fya/jK
         JE8g==
X-Gm-Message-State: AA6/9Rl9iWxISUzQJonk0hRiRA9I/GLwQZMRJT52dEhG3CVaxLKHZbmsgCtAl81Ky2hlOg==
X-Received: by 10.36.73.38 with SMTP id z38mr601953ita.35.1476810170144;
        Tue, 18 Oct 2016 10:02:50 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.6.67 with SMTP id 64ls96280iog.53.gmail; Tue, 18 Oct 2016
 10:02:48 -0700 (PDT)
X-Received: by 10.36.34.20 with SMTP id o20mr770857ito.10.1476810168695;
        Tue, 18 Oct 2016 10:02:48 -0700 (PDT)
In-Reply-To: <CAFk2RUandxAXbCfBrF5VuuZif=Z8Y__OqDWZpTbaHEjyAPQNQA@mail.gmail.com>
X-Original-Sender: MihailNajdenov@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:28946
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/28946>

------=_Part_154_868948009.1476810167308
Content-Type: multipart/alternative; 
	boundary="----=_Part_155_103732161.1476810167308"

------=_Part_155_103732161.1476810167308
Content-Type: text/plain; charset=UTF-8


On Tuesday, October 18, 2016 at 7:43:11 PM UTC+3, Ville Voutilainen wrote:
>
> ..
>
> I don't know how many times I need to point out that reset() on a 
> unique_ptr might have no 
> effect on the object lifetime, depending on the deleter. 
>

 cppreference.com:

std::unique_ptr is a smart pointer that retains sole ownership of an object 
> through a pointer and destroys that object when the unique_ptr goes out of 
> scope. No two unique_ptr instances can manage the same object. 
>
> The object is destroyed and its memory deallocated when either of the 
> following happens: 
>  the managing unique_ptr object is destroyed 
>  the managing unique_ptr object is assigned another pointer via operator= 
> or reset(). 
>
> The object is destroyed using a potentially user-supplied deleter by 
> calling Deleter(ptr). The deleter calls the destructor of the object and 
> dispenses the memory. 
>

All else is a naughty corner case. 

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/72ad1e5d-b7c0-414e-a9a1-ac56a43dd51c%40isocpp.org.

------=_Part_155_103732161.1476810167308
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Tuesday, October 18, 2016 at 7:43:11 PM UTC+3, Vill=
e Voutilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">..<br>
<br>I don&#39;t know how many times I need to point out that reset() on a
<br>unique_ptr might have no
<br>effect on the object lifetime, depending on the deleter.
<br></blockquote><div><br></div><div>=C2=A0cppreference.com:</div><div><br>=
</div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex;=
 padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-widt=
h: 1px; border-left-style: solid;"><div>std::unique_ptr is a smart pointer =
that retains sole ownership of an object through a pointer and destroys tha=
t object when the unique_ptr goes out of scope. No two unique_ptr instances=
 can manage the same object. </div><div><br></div><div>The object is destro=
yed and its memory deallocated when either of the following happens: <br>=
=C2=A0the managing unique_ptr object is destroyed <br>=C2=A0the managing un=
ique_ptr object is assigned another pointer via operator=3D or reset(). </d=
iv><div><br></div><div>The object is destroyed using a potentially user-sup=
plied deleter by calling Deleter(ptr). The deleter calls the destructor of =
the object and dispenses the memory. <br></div></blockquote><div><br></div>=
<div>All else is a naughty corner case.=C2=A0</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/72ad1e5d-b7c0-414e-a9a1-ac56a43dd51c%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/72ad1e5d-b7c0-414e-a9a1-ac56a43dd51c=
%40isocpp.org</a>.<br />

------=_Part_155_103732161.1476810167308--

------=_Part_154_868948009.1476810167308--

.
