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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80e74153f40106ab X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-04 11:02:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!freenix!proxad.net!feeder2-1.proxad.net!news3-1.free.fr!not-for-mail From: "Patrice Freydiere" Subject: Re: Weird controlled behavior - Gnat 3.15p NT Date: Thu, 04 Sep 2003 20:06:06 +0200 User-Agent: Pan/0.13.0 (The whole remains beautiful) Message-ID: Newsgroups: comp.lang.ada References: <5d6fdb61.0309040725.3403aa29@posting.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Organization: Guest of ProXad - France NNTP-Posting-Date: 04 Sep 2003 20:02:29 MEST NNTP-Posting-Host: 62.147.50.80 X-Trace: 1062698549 news3-1.free.fr 6224 62.147.50.80:32794 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:42150 Date: 2003-09-04T20:02:29+02:00 List-Id: On Thu, 04 Sep 2003 08:25:41 +0000, Jano wrote: > Hello, > > see the following type declarations and lines of code: > > type Object is abstract new > Finalization.Controlled with null record; > type Object_access is access all Object'Class; > > procedure Initialize (This : in out Object) is > begin > Trace.Log ("====>"); > end Initialize; > > procedure Finalize (This : in out Object) is > begin > Trace.Log ("<===="); > end Finalize; > > declare > -- THIS LINE IS THE RELEVANT ONE. > Thing : Object_access := > new Object'Class'(Object'Class'Input (Stream)); > begin > null; > end; > > Ok, running normally or stepping with GVD when the line with the > stream reading is executed I get the following log: > > ====> > <==== > <==== > <==== > > Compiled with -O2 and without it if that means something. Consistently > with each object in the stream. > > Now, I would assume that no Finalization could happen without a > corresponding Initialization, so is this normal? Is something wrong in > that read way? > > Regards, > > A. Mosteo. is it related to assign ?? can you log assign call , for the controlled type ?? Patrice