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,82c66e12b62744fb X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Memory leakage Date: 2000/10/02 Message-ID: <39D8F1D9.84AA53DD@acm.org>#1/1 X-Deja-AN: 676772334 Content-Transfer-Encoding: 7bit References: <39D8CD62.7B6EB2D4@boeing.com> X-Accept-Language: en X-Server-Date: 2 Oct 2000 20:36:35 GMT Content-Type: text/plain; charset=us-ascii Organization: Quadrus Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-10-02T20:36:35+00:00 List-Id: James Squire wrote: > My impression is that in Ada 95 it should not be possible to have memory > leaks, but I'm not so sure. I suspect it is a lot more difficult, but > is it indeed impossible? It is certainly a lot less likely than in C/C++ for a lot of reasons - not the least of which is that in Ada, you don't go grabbing pointers to everything in sight, like you have to in C/C++. However it is not at all impossible. Say you built a linked list package that lives at the Library level. If you messed up and didn't recover memory as you deleted nodes, you've got no language guarantee that the memory won't be floating around forever, completely inaccessible. Of course, when the program terminates, the memory ought to be recovered at that stage, but that's rather pointless to consider as a form of garbage collection. OTOH, if your usage is *not* at the library package level - perhaps within the scope of some procedure - you will reclaim that memory when you leave the scope. But thats not the way most dynamic things are done. MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Giving money and power to Government is like giving whiskey and car keys to teenage boys." -- P. J. O'Rourke ======================================================================