int _tmain (int argc, ACE_TCHAR *argv[])
{
new char[1024];
_CrtDumpMemoryLeaks();
return 0;
}
输出为:
Detected memory leaks!
Dumping objects ->
{63} normal block at 0x003A6B58, 1024 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
不显示任何代码位置,这样我无法调试。
我用的是VS 2005,非托管。
请问如何解决?谢谢。
...全文
8518打赏收藏
为什么_CrtDumpMemoryLeaks不报告代码位置
如下代码 #define _CRTDBG_MAP_ALLOC #include #include int _tmain (int argc, ACE_TCHAR *argv[]) { new char[1024]; _CrtDumpMemoryLeaks(); return 0; } 输出为: Detected memory leaks! Dumping objects -> {63} normal block at 0x003A6B58, 1024
“test.exe”: 已加载“D:\test2\Debug\test.exe”,已加载符号。
WARNING: Visual Leak Detector: A module, test2.exe, included in memory leak detection
does not have any debugging symbols available, or they could not be located.
Function names and/or line numbers for this module may not be available.
Visual Leak Detector Version 1.9d installed.
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 0 at 0x00526CC8: 1024 bytes ----------
Call Stack:
0x004113C8 (File and line number not available): (Function name unavailable)
0x00411956 (File and line number not available): (Function name unavailable)
0x0041179D (File and line number not available): (Function name unavailable)
0x7C816FD7 (File and line number not available): RegisterWaitForInputIdle