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 09:17:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!newscon06.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr11.news.prodigy.com.POSTED!not-for-mail From: "Pat Rogers" 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 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <5oKl8.401$3K.165460145@newssvr11.news.prodigy.com> NNTP-Posting-Host: 208.191.177.131 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr11.news.prodigy.com 1016558209 ST000 208.191.177.131 (Tue, 19 Mar 2002 12:16:49 EST) NNTP-Posting-Date: Tue, 19 Mar 2002 12:16:49 EST Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: Q[RGWWCEJKVOBTT^]BCB^]\@PJ_^PBQLGPQRJWQHBATBTSUBYFWEAE[YJLYPIWKHTFCMZKVMB^[Z^DOBRVVMOSPFHNSYXVDIE@X\BUC@GTSX@DL^GKFFHQCCE\G[JJBMYDYIJCZM@AY]GNGPJD]YNNW\GSX^GSCKHA[]@CCB\[@LATPD\L@J\\PF]VR[QPJN Date: Tue, 19 Mar 2002 17:16:49 GMT Xref: archiver1.google.com comp.lang.ada:21460 Date: 2002-03-19T17:16:49+00:00 List-Id: "Warren W. Gay VE3WWG" wrote in message news:3C97713C.1040805@home.com... > John McCabe wrote: > > 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. It is true: RM 13.11.2{8}: 4 Given an instance of Unchecked_Deallocation declared as follows: 5 procedure Free is new Ada.Unchecked_Deallocation( object_subtype_name, access_to_variable_subtype_name); 6 Procedure Free has the following effect: 7 1. After executing Free(X), the value of X is null. 8 2. Free(X), when X is already equal to null, has no effect. --- Patrick Rogers Consulting and Training in: http://www.classwide.com Real-Time/OO Languages progers@classwide.com Hard Deadline Schedulability Analysis (281)648-3165 Software Fault Tolerance