{ auto_ptr<int> pArrayOfInt(new int[10]); }
The auto_ptr will do a delete instead of an array delete at the end of its lifetime.
Reference: More Exceptional C++ by Herb Sutter. Addison-Wesley, 2002., p. 176.
{ auto_ptr<int> pArrayOfInt(new int[10]); }
No comments:
Post a Comment