add
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
or
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
using DEBUG_NEW in win32 Project, add #include in cppfiles and _AFXDLL in Preprocesser Definitions
尽量在前面点 不能和 重复