comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Q: Ada.Unchecked_Deallocation
Date: 1996/07/20
Date: 1996-07-20T00:00:00+00:00	[thread overview]
Message-ID: <dewar.837901831@schonberg> (raw)
In-Reply-To: ws9zq4un5ni.fsf@schonberg.cs.nyu.edu


Laurent said:

   What about (in Ada 95 without extension):

   type KLUNK_WITH_EMPTY_FINALIZE is new KLUNK with null record;
   procedure Finalize (Obj : KLUNK) is
   begin null; end Finalize;

   And instead of applying the pragma, you declare objects of this new type.
A smart compiler can optimize away calls to such a Finalize subprogram.


Robert replies

It would have to be VERY SMART! The body of Finalize appears in the
package body and the client typically only sees the package spec.
And also, this may require introducing conversions all over your program
which you would prefer to avoid.





  reply	other threads:[~1996-07-20  0:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-11  0:00 Q: Ada.Unchecked_Deallocation David Morton
1996-07-12  0:00 ` Ron Thompson
1996-07-13  0:00   ` Robert Dewar
1996-07-21  0:00     ` Robert A Duff
1996-07-12  0:00 ` Jon S Anthony
1996-07-12  0:00 ` Robert Dewar
1996-07-16  0:00   ` Robert I. Eachus
1996-07-21  0:00     ` Robert A Duff
1996-07-20  0:00   ` Laurent Guerby
1996-07-20  0:00     ` Robert Dewar [this message]
1996-07-21  0:00     ` Robert A Duff
1996-07-21  0:00   ` Robert A Duff
1996-07-21  0:00   ` Laurent Guerby
1996-07-14  0:00 ` Andy Askey
1996-07-14  0:00   ` Robert Dewar
1996-07-27  0:00     ` Uri Shina
1996-07-30  0:00       ` Theodore E. Dennison
replies disabled

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