delete this?
来源:互联网 发布:魔方3数据恢复 编辑:程序博客网 时间:2024/05/21 17:11
在《COM原理与应用》里看到这样的代码:
ULONG CDictionary::Release(){ m_Ref --; if (m_Ref == 0 ) { g_DictionaryNumber -- ; delete this; return 0; } return (ULONG) m_Ref;}
在成员函数里delete this,把自己删了。
delete this会转化为:
this->~CDictionary();
operator delete(this);
虽然delete this之后对象已经坏了,但是马上返回,应该没问题。
- delete this
- delete this
- delete this?
- delete this
- delete this
- delete this
- delete this
- delete this
- delete this
- delete this的使用
- 有关delete this
- 对象自杀 delete this
- delete this的使用
- delete this的用法
- delete this的用法
- delete this的使用
- delete this的使用
- delete this 的用处
- Box2D v2.1.0用户手册翻译 - 第08章 关节(Joints)
- JavaScript Loader相关资料的地址收集
- 女性秋季进补应从调养入手
- iModel插件介绍之DetailRequirePlugIn
- 关于《那些年啊,那些事——一个程序员的奋斗史》——24提到的鼻炎治疗方法
- delete this?
- Android内存管理策略的优化
- 《那些年啊,那些事——一个程序员的奋斗史》——25
- 库存核心业务
- 虚继承
- TCP/IP Illustrated 笔记 IP Fragmentation
- JOGL下载地址
- Android GPIO LED 驱动与HAL分析
- [CentOS 5.5 X64] Booting processor 1/4 APIC 0x2 無法開機