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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c22608a39b6f5e7b X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Dynamic Array Sizing Date: 1999/06/20 Message-ID: #1/1 X-Deja-AN: 491857125 References: <376B1811.666F042@hotmail.com> NNTP-Posting-Date: Sun, 20 Jun 1999 14:02:18 PDT Newsgroups: comp.lang.ada Date: 1999-06-20T00:00:00+00:00 List-Id: On 19 Jun 1999 17:21, jerry@jvdsys.stuyts.nl wrote: > Matthew Heaney 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.