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,5c89acd494ea9116 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!fdn.fr!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <468CCF74.3040607@obry.net> Date: Thu, 05 Jul 2007 13:01:08 +0200 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 Newsgroups: comp.lang.ada To: Maciej Sobczak Subject: Re: Self pointer in limited record References: <1183577468.034566.57830@n60g2000hse.googlegroups.com> <1183631754.917400.257350@n2g2000hse.googlegroups.com> In-Reply-To: <1183631754.917400.257350@n2g2000hse.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Date: 05 Jul 2007 13:01:16 CEST NNTP-Posting-Host: 81.249.125.101 X-Trace: 1183633276 news.orange.fr 27405 81.249.125.101:3134 X-Complaints-To: abuse@orange.fr Xref: g2news1.google.com comp.lang.ada:16419 Date: 2007-07-05T13:01:16+02:00 List-Id: Maciej Sobczak a �crit : > You mean - the access type is defined in the same scope as the record > and there is a potential danger that the access component in the > record can point to some other record that may disappear leading to > dangling pointer? I have not tested but I would expect Ada 2005 anonymous access type to work nicely here (removing the need for Unchecked_Access): type T is new Ada.Finalization.Limited_Controlled with record Self : access T := T'Access; Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595