Visual Studio memory leak detection not printing file name and line number
问题 I want to check my program for memory leaks and found this Microsoft article. I thoroughly followed the article and added #define CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> and _CrtDumpMemoryLeaks(); when the program exits. It properly dumps all the memory leak info in my output window, but here's the problem: It doesn't print the file name and line number where the memory leaks are! It says in the article that with #define _CRTDBG_MAP_ALLOC it prints the file name and line