From 7371953590734216538
X-Google-Thread: f78e5,1b57b95bf879a9da
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!local01.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 24 Aug 2005 15:00:15 -0500
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
From: "thoth39" <pedro.lamarao@gmail.com>
Newsgroups: comp.std.c++
Subject: Re: auto_ptr as a return value
Organization: http://groups.google.com
Message-ID: <1124908586.681842.17960@g14g2000cwa.googlegroups.com>
References: <1124894045.583570.226570@g14g2000cwa.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Complaints-To: groups-abuse@google.com
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: g14g2000cwa.googlegroups.com; posting-host=200.142.104.126;
   posting-account=IVgBpw0AAABL7eDtnTzNxhVVIQM8Q8Vn
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Date: Wed, 24 Aug 2005 14:51:28 CST
Lines: 15
NNTP-Posting-Host: 65.182.171.162
X-Trace: sv3-FlJd89bVjwyRnp/n4NCUr1lZ5RmWIlqHjaU8MwL6GZA0bGvUqoseZ0A2Vvb4Bv505otgPbQS7cPTObE!+hbI8uyCYt0tLtqwKh8et1c6sn/l0teBTOlOLAJIV6DIswZDeh2c57YGepuDBtvJvCrPowslK+1e!0SKMKd4CAQapA2YCziplZSLFADgIiz3MS+LL8ZiUdw==
X-Complaints-To: abuse@speakeasy.net
X-DMCA-Complaints-To: abuse@speakeasy.net
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.32
Xref: g2news1.google.com comp.std.c++:1917

> //Assuming auto_ptr is OWNER of the objects, I MUST call release()
> auto_ptr<Bla> bla = makeBla().release();

Why not:

auto_ptr<Bla> bla = makeBla();

?

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



