2005年4月17日

Item 36. Class-Specific Memory Management

摘要: Item 36. Class-Specific Memory Management在类中声明operator new 和 operator delete 成员就可以实现类自己的内存分配与管理。class Handle { public: //... void *operator ne... 阅读全文

posted @ 2005-04-17 16:23 张大大123 阅读(108) 评论(0) 推荐(0) 编辑

Item 35. Placement New

摘要: Item 35. Placement New 看起来不可能的事情在C++中总能找到解决的办法。正如,直接调用构造函数是不可能的,然而可以用placement new 欺骗编译器调用构造函数。--------------------------------------------------1、pl... 阅读全文

posted @ 2005-04-17 16:09 张大大123 阅读(78) 评论(0) 推荐(0) 编辑

导航