摘要: 我的记录:1.指定了释放器,就不会去直接调用析构函数。因为释放器就一个。不指定的话析构函数就是释放器.2.STL智能指针对内置内型的支持不如class:比如shared_ptr<char> s(new char[10]); memset(s, 0x00, 10);//error! 只能memset(s.get(), ....了。3. auto_ptr不能指定释放器.#include "iostream"#include <tr1/memory>using namespace std;using std::tr1::shared_ptr;using s 阅读全文
posted @ 2012-08-14 09:57 小鼬就是我 阅读(1597) 评论(0) 推荐(0) 编辑