_CrtDumpMemoryLeaks
Dumps all of the memory blocks in the debug heap when a memory leak has occurred (debug version only).
int _CrtDumpMemoryLeaks( void );
Routine Required Header Compatibility
_CrtDumpMemoryLeaks <crtdbg.h> Win NT, Win 95
For additional compatibility information, see Compatibility in the Introduction.
Libraries
LIBCD.LIB Single thread static library, debug version
LIBCMTD.LIB Multithread static library, debug version
MSVCRTD.LIB Import library for MSVCRTD.DLL, debug version
Return Value
_CrtDumpMemoryLeaks returns TRUE if a memory leak is found; otherwise, the function returns FALSE.
仅仅DEBUG模式起作用.