STL定义有五个全局函数,作用于未初始化空间上,这样的功能对于容器的实现很有帮助。前两个函数是用于构造的construct()和用于析构的destroy(),另三个函数是uninitialized_copy(),uninitialized_fill(),uninitialized_fill_n,分别...
分类:
其他好文 时间:
2014-12-13 21:42:01
阅读次数:
226
#include #include using namespace std;#define SHARE_FLAG string#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; }class Flyweight{public...
分类:
其他好文 时间:
2014-12-12 14:39:48
阅读次数:
155
#include #include using namespace std;#define DO_NOTHING()#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; }class Component{ friend ...
分类:
其他好文 时间:
2014-12-12 11:15:31
阅读次数:
133
#xen虚拟机管理命令xm list:所有已知的虚拟机列表xm create:启动一个非托管的虚拟机xm top:提供所有虚拟机的状态概貌xm console:打开控制台管理虚拟机xm new:添加虚拟机到Xenbase托管环境xm start:从Xenbase托管环境启动虚拟机xm destroy...
分类:
其他好文 时间:
2014-12-11 23:56:25
阅读次数:
325
//创建一个窗口const int WM_CREATE = 0x01;//当一个窗口被破坏时发送const int WM_DESTROY = 0x02;//移动一个窗口const int WM_MOVE = 0x03;//改变一个窗口的大小const int WM_SIZE = 0x05;//一个窗...
分类:
其他好文 时间:
2014-12-11 15:45:37
阅读次数:
225
#include using namespace std;#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; } class Product{public: virtual void Action()=0;};clas...
分类:
其他好文 时间:
2014-12-11 12:17:14
阅读次数:
177
c#调用c++动态库一般我们这样写[DllImport("UCamer.dll", CallingConvention = CallingConvention.Winapi)]public extern static void Disp_Destroy(IntPtr hShow);DllImport...
分类:
编程语言 时间:
2014-12-04 11:36:37
阅读次数:
315
过滤器Filter也具有生命周期:init()->doFilter()->destroy(),由部署文件中的filter元素驱动。在servlet2.4中,过滤器同样可以用于请求分派器,但须在web.xml中声明,INCLUDE或FORWARD或REQUEST或ERROR该元素位于filter-m....
分类:
编程语言 时间:
2014-12-02 13:18:21
阅读次数:
202
由于类的属性又可以是类,那么类在初始化的时候,属性类的初始化怎么办,我猜想是 重写 类的 create和destroy方法,在create和destroy中做好属性类的初始化和释放工作结果今天遇到一个内存泄露,原因是我忘记释放TAqApi了,所以造成上面这么多的内存泄露,原因是TAqApi包含了很多...
With Angular scopes, you have access to a$destroyevent that can be used to watch $scope events. This is used for cleanup, and gives you a final opport...
分类:
Web程序 时间:
2014-11-29 08:24:13
阅读次数:
477