|
-
October 3rd, 2006, 12:59 PM
#1
Use of auto_ptr
Hi all!
I just read in Meyers, Effective c++ 3rd Edition about resource management. Item 13 describes what I find very interesting, the std::auto_ptr.
I have myself experienced resource leaks due to unexcepted program termination, unexpected thread termination and so on. To avoid these problems auto pointers seems to be just perfect! Is that right?
I guess its not always recommended to use auto_ptr, then my question is when should it be used and when should it not?
It would be tempting to start to use auto_ptr whenever I am using a pointer, but that could not be right.
What I am actually questioning is a little more discussion about when to use this wonderful? auto_ptrs?
Thx
Laitinen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|