auto_ptr智能指针

C++的auto_ptr所做的事情,就是动态分配对象以及当对象不再需要时自动执行清理。
使用std::auto_ptr,要#include <memory>。
原文地址:https://www.cnblogs.com/qiwu1314/p/8818171.html