From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6dcdd5b561500c28 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!gegeweb.org!usenet-fr.net!nospam.fr.eu.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!cleanfeed1-a.proxad.net!nnrp15-1.free.fr!not-for-mail From: Samuel Tardieu Newsgroups: comp.lang.ada Subject: Re: smart pointer dangerous (no -> operator) References: Date: Sun, 18 Jan 2009 13:21:46 +0100 Message-ID: <874ozwby91.fsf@willow.rfc1149.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:TPEUAmchH8akdnmaF7R4XMAXUJY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Leafnode-NNTP-Posting-Host: 2001:6f8:37a:2::2 Organization: Guest of ProXad - France NNTP-Posting-Date: 18 Jan 2009 13:25:02 MET NNTP-Posting-Host: 91.121.19.179 X-Trace: 1232281502 news-1.free.fr 7872 91.121.19.179:41974 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:3424 Date: 2009-01-18T13:25:02+01:00 List-Id: >>>>> "Oliver" == Oliver Kowalke writes: Oliver> - returning it via access type : Oliver> function Get(Pointer : Smart_Pointer) return Access_Object; Why not use "return access Object" to get an anonymous access type, on which Unchecked_Deallocation cannot be called without jumping through hoops? Sam -- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/