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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,345a8b767542016e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-19 01:21:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!pipehawk.demon.co.uk!not-for-mail From: john.mccabe@emrad.ns.com (John McCabe) Newsgroups: comp.lang.ada Subject: Re: memory leakages with Ada? Date: Tue, 19 Mar 2002 09:21:31 GMT Organization: Emrad Ltd Message-ID: <3c97027d.1284426@news.demon.co.uk> References: <3c90af1e@news.starhub.net.sg> <3c91bfa3.1987537@news.demon.co.uk> <3C921A81.9060708@mail.com> <3C962624.5080008@home.com> NNTP-Posting-Host: pipehawk.demon.co.uk X-NNTP-Posting-Host: pipehawk.demon.co.uk:158.152.226.81 X-Trace: news.demon.co.uk 1016529631 nnrp-10:13 NO-IDENT pipehawk.demon.co.uk:158.152.226.81 X-Complaints-To: abuse@demon.net X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:21447 Date: 2002-03-19T09:21:31+00:00 List-Id: On Mon, 18 Mar 2002 17:38:46 GMT, "Warren W. Gay VE3WWG" wrote: >My own personal observation is that C/C++ programmers will err on the >side of efficiency, rather than safety. After a free()/delete, they'll >usually not set the pointer to null. I'd never really thought of it as an efficiency issue but, having used C++ for about 8 months now almost full-time I've got to the stage of pretty much setting all pointers to NULL after a delete, unless they're in a destructor (as it does seem like a waste of time there). Something else about unchecked deallocation, as far as I can remember, is that if you give it a null pointer it doesn't do anything. This is nice (but in a way it can make you lazy :-)