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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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 10:20:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed1.cidera.com!Cidera!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc01.gnilink.net.POSTED!53ab2750!not-for-mail From: "Frank J. Lhota" Newsgroups: comp.lang.ada References: <3c90af1e@news.starhub.net.sg> <3c91bfa3.1987537@news.demon.co.uk> <3C921A81.9060708@mail.com> <3C962624.5080008@home.com> <3c97027d.1284426@news.demon.co.uk> <3C97713C.1040805@home.com> Subject: Re: memory leakages with Ada? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Tue, 19 Mar 2002 18:20:05 GMT NNTP-Posting-Host: 141.154.14.20 X-Complaints-To: business-support@verizon.com X-Trace: nwrddc01.gnilink.net 1016562005 141.154.14.20 (Tue, 19 Mar 2002 13:20:05 EST) NNTP-Posting-Date: Tue, 19 Mar 2002 13:20:05 EST Xref: archiver1.google.com comp.lang.ada:21462 Date: 2002-03-19T18:20:05+00:00 List-Id: "Warren W. Gay VE3WWG" wrote in message news:3C97713C.1040805@home.com... > > 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 :-) > > > If this is true, this is bad IMHO. I'd rather know by an exception > > that I was trying to free something that was "no more", than to go > glibly forward. I'll have to test this on GNAT sometime. Yes, it is true that instantiations of Ada.Unchecked_Deallocation are required to do nothing if called with a null access value. This is also true of the C/C++ equivalents, i.e. the C call "free(NULL)" should also do nothing, according to the standard. I'm not sure why this is bad.