??????6?????STL??map???tree?????placement new?? ???????????????????????

#ifdef _DEBUG
#define DEBUG_CLIENTBLOCK   new( _CLIENT_BLOCK?? __FILE__?? __LINE__)
#else
#define DEBUG_CLIENTBLOCK
#endif
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#ifdef _DEBUG
#define new DEBUG_CLIENTBLOCK
#endif

#include <map>

????????e? #include <map>??????????檔

??????7?????????? #define new DEBUG_CLIENTBLOCK ????????????? operator new????????????????????????????

??????STL??xdebug???????????operator new???????????????new??????????????include????????????????STL????????檔

//MyClass.cpp
#include "myclass.h"
#include <map>
#include <algorithm>

#ifdef _DEBUG
#define new DEBUG_CLIENTBLOCK
#endif

MyClass::MyClass()
{
    char* p = new char('a');
}

??????8???????????????????new????????????CPP????鷳????????е?????????????????????ο????漲???????

//MemLeakChecker.h
#include <map>
#include <algorithm>
//other STL file

#ifdef _DEBUG
#define DEBUG_CLIENTBLOCK   new( _CLIENT_BLOCK?? __FILE__?? __LINE__)
#else
#define DEBUG_CLIENTBLOCK
#endif
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#ifdef _DEBUG
#define new DEBUG_CLIENTBLOCK
#endif