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,13d6cd0af0d0d769 X-Google-Attributes: gid103376,public From: jbaker@thor.tu.hac.com (John Baker) Subject: Re: Does memory leak? Date: 1995/04/04 Message-ID: <3ls2ku$qls@hacgate2.hac.com>#1/1 X-Deja-AN: 100815606 references: <3kopao$ekg@nef.ens.fr> <3kql6c$1b3@porte-de-st-ouen.ics.uci.edu> <3kuba0$8kd@gnat.cs.nyu.edu> <3l6gf6$h05@theopolis.orl.mmc.com> organization: Advanced Depot Systems newsgroups: comp.lang.ada Date: 1995-04-04T00:00:00+00:00 List-Id: Henry Baker (hbaker@netcom.com) wrote: : In article <3l6gf6$h05@theopolis.orl.mmc.com>, Theodore Dennison : wrote: : > Perhaps I'm missing something here...what exactly is wrong with using : > UNCHECKED_DEALLOCATION? : > : > I mean, if you don't deallocate what you allocate, your program will : > leak memory no matter what language it is written in. This isn't an Ada : > issue, it's an issue of sloppy coding. : Not necessarily true. I've written lots and lots of Lisp programs, and : I think that I forgot to deallocate in almost all of them. They worked : just fine. : (Of course I'm being facetious. Lisp doesn't have a deallocate primitive, : because it has an automatic garbage collector, just like Modula and Eiffel. : Furthermore, garbage collection can't collect stuff that is still linked : to live objects, so you can still get a 'leak' this way.) The Lisp i programmed in (symbolics) had a really nice feature -- allocation to *named* areas of memory. You could allocate objects with differing life spans in different areas and then (at the appropriate time), wipe a whole named area and start over without having to destroy the objects individually. Very fast and easy to control. I'd like to see a feature like that in C++ and ADA. JB