智能指针
来源:互联网 发布:好玩的网游 知乎 编辑:程序博客网 时间:2024/05/04 15:56
当只能离开了定义域就会自动释放。
在堆上声明一个simple对象
auto_ptr<simple> mySimpleSmartPtr(new simple());
这个mySimpleSmartPtr会自动释放。
相当于
simple *mySimpleSmartPtr = new simple();
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- GNU Go(http://www.gnu.org/software/gnugo/gnugo.html)
- jboss中使用log4j
- 今天集训结束后回到新校区了
- 嘿嘿
- 指针与字符串操作的一些常见错误
- 智能指针
- javascript最常用的技巧
- 不同局域网内经Internet的P2P通信技术总结
- 什么叫做开源
- JavaScript实用技巧集锦
- 敏捷和 CMM(摘录)
- OllyDbg命令行命令
- 详解FDISK /MBR 命令及其应用
- 一个月入12000家庭在广州的拮据生活