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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a37:8ec7:: with SMTP id q190mr5871054qkd.157.1567031797200; Wed, 28 Aug 2019 15:36:37 -0700 (PDT) X-Received: by 2002:a9d:5c0f:: with SMTP id o15mr5427788otk.81.1567031796937; Wed, 28 Aug 2019 15:36:36 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!a13no4024525qtd.0!news-out.google.com!d29ni3339qtg.1!nntp.google.com!a13no4024523qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 28 Aug 2019 15:36:36 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=109.136.87.156; posting-account=nuF4hQoAAADjc2KKS1rOkzxWWEmaDrvx NNTP-Posting-Host: 109.136.87.156 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Question about finalization of local object returned from the function From: darkestkhan Injection-Date: Wed, 28 Aug 2019 22:36:37 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57090 Date: 2019-08-28T15:36:36-07:00 List-Id: Given a function returning controlled type: function Bar return T is Foo : T; begin ... return Foo; end Bar; would Foo be finalized upon end of the function? As far as I can understand from the standard - yes, Foo would get finalized. Also if Foo was just a normal record type with controlled components those components would be finalized as well. But I am not fully confident that my understanding of this is correct... Thanks, darkestkhan