Wednesday, October 14, 2009

c++: auto_ptr::release()

auto_ptr::release()

The release() function removes ownership of the stored object from the
invoking auto_ptr and returns a pointer to the object. After a call to release(),
the pointed-to object is not automatically destroyed when the auto_ptr object
goes out of scope.

 -- Herb Schildt's C++ Programming Cookbook, Chapter 7, page 489

No comments: