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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cb73ffe253a5caf1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!216.196.98.145.MISMATCH!feeder1.nntp.dca.giganews.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny04.POSTED!0f19ed38!not-for-mail From: "Frank J. Lhota" Reply-To: NOSPAM.lhota@adarose.com User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Memory management clarification References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Tue, 26 Jul 2005 13:57:09 GMT NNTP-Posting-Host: 151.203.10.10 X-Complaints-To: abuse@verizon.net X-Trace: trndny04 1122386229 151.203.10.10 (Tue, 26 Jul 2005 09:57:09 EDT) NNTP-Posting-Date: Tue, 26 Jul 2005 09:57:09 EDT Xref: g2news1.google.com comp.lang.ada:3784 Date: 2005-07-26T13:57:09+00:00 List-Id: Maciej Sobczak wrote: > Hi, > > Trying to learn a bit of Ada I came across a statement that memory > allocated from the pool will be implicitly reclaimed when the acces > variable used to reference it goes out of scope. No, that is not true. What is true is that if an access type goes out of scope, then the data allocated from the pool for that type will be reclaimed. See ARM 13.11 (18). Most Ada implementations do not support garbage collection, and with such implementations, your examples would simply create a lot of garbage.