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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c233446a6027f1ed X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-19 03:30:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-lei1.dfn.de!newsfeed.freenet.de!news.freenet.de!not-for-mail From: Jan Prazak Subject: Re: access / freeing memory Date: Fri, 19 Jul 2002 12:32:00 -0100 Newsgroups: comp.lang.ada Message-ID: References: User-Agent: Pan/0.11.2 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso885915 Content-Transfer-Encoding: 8bit X-Comment-To: "chris.danx" NNTP-Posting-Host: 213.7.195.74 X-Trace: 1027074633 news.freenet.de 32655 213.7.195.74 X-Complaints-To: abuse@freenet.de Xref: archiver1.google.com comp.lang.ada:27246 Date: 2002-07-19T12:32:00-01:00 List-Id: On Thu, 18 Jul 2002 17:22:38 -0100, chris.danx wrote: >> head.next.next := null; (to delete the 3rd element) >> >> or similar things??? > > How do you know that head.next.next exists? Because the stack is head->1->2->3->null (it's just an example). > Firstly, when you create an object via 'new' it is allocated and > initialised. Usually a call to new will typically take memory from the > heap, this is an area of memory typically used for dynamic memory > management. The heap is usually within your program, and the compiler > will insert code to manage it. <...> Thanks for this long description. I have already some experience with pointers (in Pascal), so I have already found out how it works, but I didn't know anything about heap (I didn't even know what it is, I thought of some kind of a stack), so now I'm a bit wiser. > p.s. why do ppl mention things like Storage_Pools to newbies? It only > confuses them and makes things harder! Yes, that was really confusing... BTW: I have read that Modula-3 has a fully functionable garbage collection, and M3 is also free available, but I think I will continue using Ada and have a look at M3 later. To all: does someone know where to find a brief comparison between Ada95 and M3? Jan