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,9ce5fb49dc74582f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!j44g2000cwa.googlegroups.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: generic question Date: 20 Nov 2006 13:50:58 -0800 Organization: http://groups.google.com Message-ID: <1164059458.442430.110710@j44g2000cwa.googlegroups.com> References: <1163959439.299036.129940@e3g2000cwe.googlegroups.com> <87mz6nnt4v.fsf@ludovic-brenta.org> <20061119202320.19149a2f@cube.tz.axivion.com> <4560D5BE.5060508@obry.net> NNTP-Posting-Host: 66.162.65.129 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1164059463 4622 127.0.0.1 (20 Nov 2006 21:51:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 20 Nov 2006 21:51:03 +0000 (UTC) In-Reply-To: <4560D5BE.5060508@obry.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j44g2000cwa.googlegroups.com; posting-host=66.162.65.129; posting-account=Zl1UPAwAAADEsUSm1PMMiDjihtBlZUi_ Xref: g2news2.google.com comp.lang.ada:7590 Date: 2006-11-20T13:50:58-08:00 List-Id: Pascal Obry wrote: > > You probably don't want "access Node" here as you won't be able to > deallocate such pointer. There is no way to instantiate > Unchecked_Conversion with an anonymous access type. This is something I > found quite irritating in Ada 2005. Storage pools are associated with named access types. (I think it's possible to allocate using an anonymous access type, but to me that's thoroughly confusing and so I have never attempted to do so.) With anonymous access types the programmer must maintain the association between allocated instance and its pool. You can only allocate from a pool, and you must deallocate to the same pool from which you allocated, so at some point there needs to be a conversion between the anonymous access type and the named access type (with which the storage pool is associated).