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!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!newsfeed1.sea.pnap.net!newsfeed2.sea.pnap.net!newsfeed.pnap.net!brmea-news-1.sun.com!news1brm.central.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: memory management and productivity Date: 22 Jun 2004 09:53:49 +0200 Organization: Sun Microsystems Message-ID: References: <40d15023$1_1@baen1673807.greenlnk.net> <2jnh22F12nvieU2@uni-berlin.de> <40d69b1c$1_1@baen1673807.greenlnk.net> NNTP-Posting-Host: khepri06.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: new-usenet.uk.sun.com 1087890829 29351 129.159.112.195 (22 Jun 2004 07:53:49 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 22 Jun 2004 07:53:49 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:1765 Date: 2004-06-22T07:53:49+00:00 List-Id: >>>>> "MD" == Martin Dowie writes: MD> "Ole-Hjalmar Kristensen" MD> wrote in message MD> news:wvbrsmcp2uqd.fsf@europa1.Norway.Sun.COM... >> > 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. >> >> This is exactly the same as C++. I would say that Ada and C++ are >> more or less on equal footing when it comes to garbage collection in >> practice. MD> No! Please try the example I posted - in Ada an access to a controlled MD> object is automatically finalized - this is different (and better!) than MD> C++. MD> Cheers MD> -- Martin Well, perhaps, but what Jano described is exactly like C++. Doesn't the automatic finalization of an access to a controlled object happen only when the *type* goes out of scope? -- C++: The power, elegance and simplicity of a hand grenade.