From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Freeing access-to-task objects Date: Sun, 9 Oct 2022 21:42:38 +0200 Organization: A noiseless patient Spider Message-ID: References: <86a665htb0.fsf@stephe-leake.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 9 Oct 2022 19:42:38 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="902b48236e336f1880727d3b153a34f2"; logging-data="498568"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198uNtsIBQaalbnBQEWCpeJG7rvboNn1ys=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cancel-Lock: sha1:U6F5Bo40SFRq2axC+BokHorrHl8= In-Reply-To: <86a665htb0.fsf@stephe-leake.org> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64480 List-Id: On 2022-10-09 18:10, Stephen Leake wrote: > "Jeffrey R.Carter" writes: > >> On 2022-10-01 13:40, J-P. Rosen wrote: >>> 1) declare the access type in a block, which is then the master of >>> the tasks. When you exit the block, the tasks are terminated. >> >> When you exit the block, the access type doesn't exist, so you can't >> free anything. > > But Ada frees all objects allocated using the locally declared access > type when the block is exited. This is only required if the access type has Storage_Size specified (ARM 13.11/18.4 http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-11.html#I5208). -- Jeff Carter "I was hobbling along, minding my own business, all of a sudden, up he comes, cures me! One minute I'm a leper with a trade, next minute my livelihood's gone! Not so much as a 'by your leave!' You're cured, mate. Bloody do-gooder!" Monty Python's Life of Brian 76