comp.lang.ada
 help / color / mirror / Atom feed
From: "Patrice Freydiere" <frett27@free.fr>
Subject: Re: Weird controlled behavior - Gnat 3.15p NT
Date: Thu, 04 Sep 2003 20:06:06 +0200
Date: 2003-09-04T20:02:29+02:00	[thread overview]
Message-ID: <pan.2003.09.04.18.05.55.639480@free.fr> (raw)
In-Reply-To: 5d6fdb61.0309040725.3403aa29@posting.google.com

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





  parent reply	other threads:[~2003-09-04 18:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-04 15:25 Weird controlled behavior - Gnat 3.15p NT Jano
2003-09-04 15:40 ` Martin Krischik
2003-09-04 18:06 ` Patrice Freydiere [this message]
2003-09-04 19:03   ` Jano
2003-09-04 20:57     ` Jano
2003-09-05  8:48     ` Preben Randhol
2003-09-05 13:48       ` Jano
2003-09-04 21:36 ` Robert I. Eachus
2003-09-05  4:04   ` Randy Brukardt
2003-09-05 13:48     ` Jano
2003-09-05 14:33       ` Dmitry A. Kazakov
2003-09-09  2:01   ` Hyman Rosen
2003-09-09  7:02     ` Jean-Pierre Rosen
2003-09-11  3:40       ` Hyman Rosen
2003-09-09  8:22     ` Dmitry A. Kazakov
2003-09-11  3:46       ` Hyman Rosen
2003-09-11  8:23         ` Dmitry A. Kazakov
2003-09-05  7:10 ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox