Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
a question on reference
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="peter koch, post: 2576421"] As others have told you, it will not. What is wrong with MyClass A(my_arguments); //... use A // no need to delete pA or worry about exceptions If you simply can't do it the "right" way, I'd recommand that you use std::auto_ptr instead: std::auto_ptr<MyClass> pA (new MyClass( my_arguements)); MyClass & rA = *pA; // no need to delete pA or worry about exceptions /Peter [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
a question on reference
Top