comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: Dynamic Array Sizing
Date: 1999/06/20
Date: 1999-06-20T00:00:00+00:00	[thread overview]
Message-ID: <m3k8syd1lx.fsf@mheaney.ni.net> (raw)
In-Reply-To: FDL476.5C@stuyts.nl

On 19 Jun 1999 17:21, jerry@jvdsys.stuyts.nl wrote:

> Matthew Heaney <matthew_heaney@acm.org> wrote:
> : Why did you put the data on the heap?
> 
> Why not ?

Because Ada has constructs specifically designed to obviate the need for
heap.  

When you have a choice between putting an object on the heap versus the
stack, you should choose the stack.

You could have easily done this:

    Data : Array_Type (1 .. Data_Elements (File_Name));
  begin
    Load_Data (File_Name, Data);


Heap allocation is not necessary, nor is heap deallocation.








  




  reply	other threads:[~1999-06-20  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-19  0:00 Dynamic Array Sizing Nick Wilson
1999-06-19  0:00 ` Tom Moran
1999-06-19  0:00 ` jerry
1999-06-19  0:00   ` Matthew Heaney
1999-06-19  0:00     ` jerry
1999-06-20  0:00       ` Matthew Heaney [this message]
1999-06-21  0:00         ` jerry
1999-06-19  0:00   ` jerry
1999-06-19  0:00 ` Matthew Heaney
1999-06-20  0:00   ` Nick Wilson
1999-06-20  0:00     ` Matthew Heaney
replies disabled

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