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-Thread: 103376,147f221051e5a63d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: memory management in Ada: tedious without GC? Date: Sun, 18 May 2008 21:48:13 +0100 Organization: Pushface Message-ID: References: <4ddef8bf-b5b1-4d7e-b75b-386cd6c8402c@l17g2000pri.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1211143692 28299 62.49.19.209 (18 May 2008 20:48:12 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 18 May 2008 20:48:12 +0000 (UTC) Cancel-Lock: sha1:8tdSWEZ3svMRF6CvknGE11n7KPU= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) Xref: g2news1.google.com comp.lang.ada:214 Date: 2008-05-18T21:48:13+01:00 List-Id: Maciej Sobczak writes: > On 18 Maj, 10:06, Simon Wright wrote: > >> Is auto_ptr the one where assignment moves the content? "b = a;" >> means that a is now null and b references the previous content of >> a? > > Yes. > >> If so, it seems to me that it's the concept that's spectacularly >> silly! > > It has its own very reasonable use case: safe returning dynamically > allocated objects from functions. That was the use I'd thought of.