我爱Aspx >> VC.Net >> Don Box:Smart Pointers : What , Why , Which?If we use a smart pointer, however, p will be cleaned up whenever it gets out of scope, whether it was during the normal path of execution or during the stack unwinding caused by throwing an exception.
But isn´t it possible to write exception safe code with regular pointers? Sure, but it is so painful that I doubt anyone actually does this when there is an alternative. Here is what you would do in this simple case:
void foo 【我对这篇文章有话说?】
企业上网的几个理由[05-21]
如何在Linux下实现设备的配置[05-21]
非窗口类中使用定时器的方法(二..[05-21]
非窗口类中使用定时器的方法(一..[05-21]
非窗口类中使用定时器的方法[05-21]
深度探索win32可执行文件格式[05-21]
const用法的体会[05-21]
一个典型的例子解决常见的高级Wi..[05-21]
由零开始做 Dialog (SDK版) — 在..[05-21]
C++机理:虚拟机制的实现[兼谈对..[05-21]