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,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-28 20:17:07 PST Path: news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!in.100proofnews.com!in.100proofnews.com!cycny01.gnilink.net!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny03.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? References: <3F74366B.7050303@noplace.com> <3F74DF86.30206@comcast.net> <3F75A00A.2000007@noplace.com> <3F76F426.3030907@noplace.com> In-Reply-To: <3F76F426.3030907@noplace.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 29 Sep 2003 03:17:07 GMT NNTP-Posting-Host: 162.83.244.79 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny03.gnilink.net 1064805427 162.83.244.79 (Sun, 28 Sep 2003 23:17:07 EDT) NNTP-Posting-Date: Sun, 28 Sep 2003 23:17:07 EDT Xref: news1.google.com comp.lang.ada:99 Date: 2003-09-29T03:17:07+00:00 List-Id: Marin David Condic wrote: > Now when I've worked with C/C++, GC seems like it would make a lot more > sense. There you *must* use pointers to just about everything and things > are easily dropped on the floor. Because of the extensive need for > pointers and malloc/free usage everywhere, it seems to make more sense > to have GC. But I don't know that there are lots of C++ compilers out > there supporting GC either. When talking about memory leaks, it doesn't make any sense to talk about "C/C++". There are aspects of C++ which were designed precisely to handle the kinds of memory problems found in C. In particular, the simple fact that destructors are always called for objects when their lifetime ends means that most pointers will never be "dropped on the floor". Memory leaks still happen, but mostly in complexly linked data structures where ownership of pointers can become unclear.