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,FREEMAIL_FROM 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-16 12:36:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.cis.ohio-state.edu!news.compuserve.com!news-master.compuserve.com!not-for-mail From: DPH Newsgroups: comp.lang.ada Subject: Re: memory leakages with Ada? Date: Sat, 16 Mar 2002 15:36:45 -0500 Organization: CompuServe Interactive Services Message-ID: <11b79ugdvbkho11nfe1bho92se6km9h3hi@4ax.com> References: <3c90af1e@news.starhub.net.sg> <3c91bfa3.1987537@news.demon.co.uk> NNTP-Posting-Host: mid-tgn-nos-vty168.as.wcom.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: suaar1aa.prod.compuserve.com 1016310990 1866 216.192.78.168 (16 Mar 2002 20:36:30 GMT) X-Complaints-To: newsmaster@compuserve.com NNTP-Posting-Date: 16 Mar 2002 20:36:30 GMT X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:21344 Date: 2002-03-16T20:36:30+00:00 List-Id: On Sat, 16 Mar 2002 20:18:31 GMT, Robert A Duff wrote: >DPH writes: > >> >I have to remember to say: >> > >> >delete[] p; >> >> No you don't... you just write it with Borland C++ Builder 5 or better >> with CodeGuard turned on, and CodeGuard will complain about it all >> over the place. > >I've never used Borland C++ Builder 5, but I don't believe it can >complain about this sort of thing at compile time in the general case, >because it is impossible to distinguish a pointer-to-thing from a >pointer-to-array-of-things. > >- Bob CodeGuard's pretty smart. It knows, even if the language doesn't. When I turned it onto the code someone else built without CodeGuard, it gave me a whole pile of error messages with those double bracket required to delete array errors. It was called out in the error window like any other error, and I clicked on it and it took me right to the particular line. I just stuck those brackets on the delete and the problem was solved. Dave Head