求助:VLD检测内存泄漏时定位不到自己的代码

FoxBryant FoxBryant 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
MFC程序,用最新的Visual Leak Detector (VLD) V2.2.3 检测内存泄漏,可以检测到有内存泄漏的地方,但是调用堆栈中全是系统的函数调用,没有显示在我代码的哪个文件/函数/行号等信息,如下:

---------- Block 5232 at 0x030C0328: 8 bytes ----------
Call Stack:
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory (36): MFCTest.exe!std::_Allocate<std::_Container_proxy> + 0x15 bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory (187): MFCTest.exe!std::allocator<std::_Container_proxy>::allocate + 0xB bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring (469): MFCTest.exe!std::_String_val<wchar_t,std::allocator<wchar_t> >::_String_val<wchar_t,std::allocator<wchar_t> > + 0xA bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring (543): MFCTest.exe!std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > + 0x5F bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility (163): MFCTest.exe!std::_Pair_base<CStdStr<wchar_t> const ,CStdStr<wchar_t> >::_Pair_base<CStdStr<wchar_t> const ,CStdStr<wchar_t> ><CStdStr<wchar_t> const &,CStdStr<wchar_t> &> + 0x76 bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\utility (195): MFCTest.exe!std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> >::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> ><CStdStr<wchar_t> const ,CStdStr<wchar_t> > + 0x55 bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory (208): MFCTest.exe!std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > >::construct<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > &> + 0x3C bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xmemory (281): MFCTest.exe!std::_Cons_val<std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > >,std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> >,std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > &>
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (592): MFCTest.exe!std::_Tree_val<std::_Tmap_traits<CStdStr<wchar_t>,CStdStr<wchar_t>,std::less<CStdStr<wchar_t> >,std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > >,0> >::_Buynode<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > &> + 0x2F bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (1521): MFCTest.exe!std::_Tree<std::_Tmap_traits<CStdStr<wchar_t>,CStdStr<wchar_t>,std::less<CStdStr<wchar_t> >,std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > >,0> >::_Copy + 0x15 bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (1501): MFCTest.exe!std::_Tree<std::_Tmap_traits<CStdStr<wchar_t>,CStdStr<wchar_t>,std::less<CStdStr<wchar_t> >,std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > >,0> >::_Copy + 0x1A bytes
c:\program files (x86)\microsoft visual studio 10.0\vc\include\xtree (802): MFCTest.exe!std::_Tree<std::_Tmap_traits<CStdStr<wchar_t>,CStdStr<wchar_t>,std::less<CStdStr<wchar_t> >,std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > >,0> >::operator=
c:\program files (x86)\microsoft visual studio 10.0\vc\include\map (150): MFCTest.exe!std::map<CStdStr<wchar_t>,CStdStr<wchar_t>,std::less<CStdStr<wchar_t> >,std::allocator<std::pair<CStdStr<wchar_t> const ,CStdStr<wchar_t> > > >::operator=
0x76773677 (File and line number not available): kernel32.dll!BaseThreadInitThunk + 0x12 bytes
0x77669F42 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x63 bytes
0x77669F15 (File and line number not available): ntdll.dll!RtlInitializeExceptionChain + 0x36 bytes

请问如何查看泄漏是对应到我自己代码的哪个地方呢?
...全文

相关推荐

评论 2
收藏 已收藏
分享
返回顶部
FoxBryant
资源 2,586 成员 18,437 内容