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 10.13.215.13 with SMTP id z13mr116832693ywd.7.1452483343663; Sun, 10 Jan 2016 19:35:43 -0800 (PST) X-Received: by 10.182.153.36 with SMTP id vd4mr663928obb.10.1452483343630; Sun, 10 Jan 2016 19:35:43 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!6no4183479qgy.0!news-out.google.com!l1ni9953igd.0!nntp.google.com!h5no2822337igh.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 10 Jan 2016 19:35:43 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:18f:900:8350:ba86:87ff:fed6:5907; posting-account=3pYsyQoAAACcI-ym7XtMOI2PDU8gRZS5 NNTP-Posting-Host: 2601:18f:900:8350:ba86:87ff:fed6:5907 References: <293c58ac-4ebd-488a-abcc-b6e88811eec8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Why is the destructor called multiple times after I declare an object? From: Andrew Shvets Injection-Date: Mon, 11 Jan 2016 03:35:43 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29085 Date: 2016-01-10T19:35:43-08:00 List-Id: On Sunday, January 10, 2016 at 9:18:57 PM UTC-5, Jeffrey R. Carter wrote: > On 01/10/2016 06:37 PM, Andrew Shvets wrote: > > > > Why is "Resetting values of Creat to defaults." displaying 6 times as opposed to just twice? > > ARM 7.6(13-17.1) apply here. Note that Init declares a local variable of the > type, which is finalized when Init returns, and that the anonymous object that > is the result of the call to Init is finalized after initialization is finished. > This gives you 2 calls to Finalize for each variable of the type declared and > initialized by a call to Init. Finally you have a call to Finalize for each > variable of the type when the program ends. > > http://www.adaic.org/resources/add_content/standards/12rm/html/RM-7-6.html > > -- > Jeff Carter > "Death awaits you all, with nasty, big, pointy teeth!" > Monty Python & the Holy Grail > 20 I see. Thank you for your explanation.