1 #define _CRTDBG_MAP_ALLOC 2 #include <stdlib.h> 3 #include <crtdbg.h> 在程序的结束处,_CrtDumpMemoryLeaks();