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,b99897135d6631cc X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Jano Newsgroups: comp.lang.ada Subject: Re: memory management and productivity Date: Mon, 21 Jun 2004 10:22:15 +0200 Message-ID: <2jnk5nF12uei1U1@uni-berlin.de> References: <40d15023$1_1@baen1673807.greenlnk.net> <2jnh22F12nvieU2@uni-berlin.de> <40d694da$1_1@baen1673807.greenlnk.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de UJkuqt0pNDkxHQIdC5nPLw2WT0OUw18YZOUaHeEfxSbKkU5JQ= User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en In-Reply-To: <40d694da$1_1@baen1673807.greenlnk.net> Xref: g2news1.google.com comp.lang.ada:1731 Date: 2004-06-21T10:22:15+02:00 List-Id: Martin Dowie wrote: > "Jano" wrote in message > news:2jnh22F12nvieU2@uni-berlin.de... > >>It's been so many time since I did C++ that I may be wrong, correct me >>in that case. >> >>IIRC, in C++ you must destroy (delete?) the object to get the destructor >>called. So, even if you have a carefully built chain of destructors, if >>at some point you forget to destroy the root, you're leaking. >> >>In Ada, when an object goes out of scope (assuming it has been created >>in the stack and not with the "new" operator), it's automatically >>finished so you have one less thing to care about. > I want to add that you also don't need to explicitly destroy object members, of course, since Finalize is called on them automagically... > Not quite true! Try this... I get this: Initialize Finalize Finalize Wibble Finalize Finalize and I'm impressed because I didn't knew these differences. I must however admit that I don't understand exactly what's happening and gvd sigfaults on me (w2000). Could you provide a short explanation please? > BTW Jano - are you ever going to make that announcement in cla? ;-) For the next release... if I get time to do it ;)