摘要:
#include <iostream>using namespace std;#define DECLARE_SAFE_RELEASE() virtual void Release() { delete this; }#define SAFE_RELEASE(p) { if (NULL != p) { (p)->Release(); (p)=NULL; } }class A{public: A() { pA = new int(10); cout << *pA << endl; } virtual ~A() { delete pA; cout < 阅读全文