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-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,XPRIO autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Custom Storage Pool questions Date: Mon, 20 Sep 2021 19:30:41 -0500 Organization: JSA Research & Innovation Message-ID: References: <1d2551f4-8189-44ec-a54d-4a56a672bedcn@googlegroups.com> Injection-Date: Tue, 21 Sep 2021 00:30:43 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="24143"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:62796 List-Id: "Dmitry A. Kazakov" wrote in message news:si77kd$rka$1@gioia.aioe.org... > On 2021-09-19 12:36, Niklas Holsti wrote: ... >> Local variables declared in a subprogram are also not explicitly freed >> (deallocated), yet they are automatically finalized when the subprogram >> returns. > > Local objects are certainly freed. Explicit or not, aggregated or not, is > irrelevant. OK... >> My understanding of Ada semantic principles is that any object that is >> initialized should also be finalized. > > IFF deallocated. ...as you note above for stack objects, all objects are conceptually deallocated. Whether the memory is actually returned to a storage pool is irrelevant. The original Ada model was that Unchecked_Deallocation is something to be avoided if at all possible (thus the name), one would never want to tie finalization to such a thing. Randy.