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:27:23 +0200 Message-ID: <2jnkfbF12uei1U2@uni-berlin.de> References: <40d15023$1_1@baen1673807.greenlnk.net> <2jnh22F12nvieU2@uni-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de zVKZnXAMvTFIvetREVJFiAMbHSOb/78WKAv8pg4VTpNwKdN3Q= User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:1732 Date: 2004-06-21T10:27:23+02:00 List-Id: Ole-Hjalmar Kristensen wrote: >>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. > > > Yes, *IF* it has been allocated with new. That's what I wasn't sure about. In java you're forced (right this time?) but in C++ I wasn't sure. But as others have noted, indefinite types and containers for them are a blessing.