comp.lang.ada
 help / color / mirror / Atom feed
From: "Bobby D. Bryant" <bdbryant@mail.utexas.edu>
Subject: Q re Unchecked_Deallocation for unconstrained arrarys.
Date: Sat, 14 Apr 2001 06:25:39 +0600
Date: 2001-04-14T12:23:24+00:00	[thread overview]
Message-ID: <3AD79903.C48AB1BB@mail.utexas.edu> (raw)

Does Unchecked_Deallocation work with unconstrained arrays?  If so, will
a single instance work for all arrays in the type, or is a different
instance needed for each actual array size?

Here are some snippets that show what I am trying to do:

   type DNA_String is array( Positive range <> ) of Float;
   type DNA_Ptr is access DNA_String;

...

   procedure Free is
      new Ada.Unchecked_Deallocation( DNA_String, DNA_Ptr );

...

      DNA : DNA_Ptr;

...

      DNA := new DNA_String( 1 .. Number_Of_Units**2 );

...

      Free( DNA );



Thanks,

Bobby Bryant
Austin, Texas





             reply	other threads:[~2001-04-14  0:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-14  0:25 Bobby D. Bryant [this message]
2001-04-16  0:10 ` Q re Unchecked_Deallocation for unconstrained arrarys Jeff Creem
2001-04-15 22:25   ` Bobby D. Bryant
replies disabled

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