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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-01 13:13:13 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada References: <8urxb.19482$sb4.18182@newsread2.news.pas.earthlink.net> <1792884.HtYz4Yv8lY@linux1.krischik.com> In-Reply-To: <1792884.HtYz4Yv8lY@linux1.krischik.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 01 Dec 2003 21:13:12 GMT NNTP-Posting-Host: 63.184.33.225 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1070313192 63.184.33.225 (Mon, 01 Dec 2003 13:13:12 PST) NNTP-Posting-Date: Mon, 01 Dec 2003 13:13:12 PST Xref: archiver1.google.com comp.lang.ada:3058 Date: 2003-12-01T21:13:12+00:00 List-Id: Martin Krischik wrote: > Hyman Rosen wrote: > > >>Jeffrey Carter wrote: >> > you cannot create a dangling reference with 'Access. >> >>How not? Just deallocate the object to which the pointer points. > > > How will you do this without using some form of "Unchecked_"? 'access creates an access value to something that is not allocated by the programmer on the heap, so it cannot be deallocated: declare type Integer_Ptr is access all Integer; I : aliased Integer; P : Integer_Ptr := I'access; begin null; end; You cannot deallocate I (except by leaving its scope). -- Jeff Carter "In the frozen land of Nador they were forced to eat Robin's minstrels, and there was much rejoicing." Monty Python & the Holy Grail 70