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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80e74153f40106ab,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-04 08:25:44 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: 402450@cepsz.unizar.es (Jano) Newsgroups: comp.lang.ada Subject: Weird controlled behavior - Gnat 3.15p NT Date: 4 Sep 2003 08:25:41 -0700 Organization: http://groups.google.com/ Message-ID: <5d6fdb61.0309040725.3403aa29@posting.google.com> NNTP-Posting-Host: 80.58.47.107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1062689143 21416 127.0.0.1 (4 Sep 2003 15:25:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Sep 2003 15:25:43 GMT Xref: archiver1.google.com comp.lang.ada:42148 Date: 2003-09-04T15:25:43+00:00 List-Id: 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.