This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/18272] weird behaviour on temporary return values


------- Additional Comments From philippe dot haution at mines-paris dot org  2004-11-02 15:58 -------
Well OK, I'll check with purify that res3 and res4 memory area is released
whether or not res5 has been intialized.

I will from now on use
vector<int>& res5 = *(ert().release());

as the correct way to get a reference to an object returned wrapped into an
auto_ptr.

Regards.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18272


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]