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: jerry@jvdsys.stuyts.nl Subject: Re: Dynamic Array Sizing Date: 1999/06/21 Message-ID: #1/1 X-Deja-AN: 492027404 Sender: jerry@stuyts.nl (Jerry van Dijk) References: <376B1811.666F042@hotmail.com> Organization: * JerryWare HQ *, Leiden, Holland User-Agent: tin/pre-1.4-980226 (UNIX) (Linux/2.2.10 (i586)) Newsgroups: comp.lang.ada Date: 1999-06-21T00:00:00+00:00 List-Id: 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. Using the same logic I can claim that Ada has specific facilities for managing heap based objects, so one should avoid putting data on the stack :-) :-) Reality is that either is possible, and that the choice made will depend on the problem domain, requirements and local standards. In this example I see no problem in using the heap. I you are really affraid of undeallocated memory, make the type controlled and override the Finalize procedure. regards, Jerry. -- -- Jerry van Dijk | Leiden, Holland -- Team Ada | jdijk@acm.org -- see http://stad.dsl.nl/~jvandyk