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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada 2005,Doubly_Linked_List with Controlled parameter Date: Mon, 4 Apr 2016 22:24:45 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <05bc57c3-9811-4248-935c-b86156298a90@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 5 Apr 2016 05:21:31 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="48b46be33beed75863f69afa437f956b"; logging-data="3342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oAIbZlmdtAE+UuT61eSoR2VrWCCLvabg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <05bc57c3-9811-4248-935c-b86156298a90@googlegroups.com> Cancel-Lock: sha1:icIL6Cv6pYasDjhlwdDzLSgcj1s= Xref: news.eternal-september.org comp.lang.ada:29980 Date: 2016-04-04T22:24:45-07:00 List-Id: On 04/04/2016 08:25 PM, George J wrote: > > And i can't understand, why Finalize starts immediately after I set any data > to my record? Is it the specifics of the Finalization mechanism? You create an aggregate of your controlled type, which is an object of the type. Append makes a copy of that object to store in the list. When you leave the procedure that did the Append, the aggregate goes out of scope and is finalized. (Presumably that leaves the copy in the list with a dangling reference.) -- Jeff Carter "Hold your temper. Count ten.... Now let 'er go. You got a good aim." Never Give a Sucker an Even Break 105