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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,19b8909eebb73a8e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Question on Controlled types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4a211b98$0$2862$ba620e4c@news.skynet.be> <1m6a6s5xq3hrf.1i7zbi65wq3cd$.dlg@40tude.net> <2f907a62-5ce3-41bc-816b-9efdaf8f2982@h2g2000yqg.googlegroups.com> Date: Thu, 4 Jun 2009 16:04:17 +0200 Message-ID: <1oa4b8avzgtos.3ofldt4u0hnh.dlg@40tude.net> NNTP-Posting-Date: 04 Jun 2009 16:04:17 CEST NNTP-Posting-Host: c3797240.newsspool1.arcor-online.net X-Trace: DXC=X6G4okFSB4Agj[ZPFj7ehOic==]BZ:afN4Fo<]lROoRA^YC2XCjHcbII8U?7n]C4EADNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBE7K`5oCD?3L X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6243 Date: 2009-06-04T16:04:17+02:00 List-Id: On Thu, 4 Jun 2009 05:32:59 -0700 (PDT), Hibou57 (Yannick Duch�ne) wrote: > On 30 mai, 15:27, "Dmitry A. Kazakov" > wrote: >> The formula is I + A = F, where I is the number of calls to Initialize, A >> is the number of calls to Adjust and F is the number of calls to Finalize. >> >> Note that the compiler has right to optimize some pairs Adjust/Finalize >> away or add new ones. > > So this means that if there was a second assignation of Delay1, > Finalize would be invoked before the copy and the Adjust which will > follow the copy ? Yes. Initialization contains a call to either Initialize or Adjust Assignment contains one call to Finalize and next to Adjust Finalization contains a call to Finalize In C++ terms: Initialize is a part of the "default constructor". Adjust is a part of the "copy constructor". ":=" is composed out of the "destructor", bitwise copy and a call to Adjust. The "destructor" calls to Finalize. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de