亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Using Visual Leak Detector

系統 2344 0

Visual Leak Detector for Visual C++ 2008/2010/2012

Using Visual Leak Detector


This section briefly describes the basics of using Visual Leak Detector (VLD).

Important! : Before using VLD with any Visual C++ project, you must first add the Visual Leak Detector include and library directories to the Visual C++ include and library directory search paths:
For all compiler versions take care to ensure that no junk characters get added when you add the include and library paths. If you browse to the "Program Files(x86) folder using the dialog box provided by Visual Studio and select it you could end up seeing the "%" replacing the "(".

And remember to close and open the Visual Studio IDE once you have modified the default include and library paths which the compiler and linker would always look at.

  • Visual C++ 2010 : Go to View ->Property Manager , select Microsoft.Cpp.Win32.user . Select VC++ Directories and then "Include files" from the tree. Add the include subdirectory from the Visual Leak Detector installation directory. Move it to the bottom of the list. Then select "Library files" from the drop-down menu and add the lib\Win32 subdirectory from the Visual Leak Detector installation directory. Again, move it to the bottom of the list. Repeat for Microsoft.Cpp.x64.user , but select lib\Win64 subdirectory instead.
  • Visual C++ 2005 and 2008 : Go to Tools -> Options -> Projects and Solutions -> VC++ Directories . Select "Include files" from the "Show Directories For" drop-down menu. Add the include subdirectory from the Visual Leak Detector installation directory. Move it to the bottom of the list. Then select "Library files" from the drop-down menu and add the lib\Win32 subdirectory from the Visual Leak Detector installation directory. Again, move it to the bottom of the list.
  • Visual C++ 2003 : Go to Project Properties -> C/C++ -> General -> Additional Include Directories and add the include subdirectory from the Visual Leak Detector installation directory. Move it to the bottom of the list. Then select Additional Library Directories and add the lib\Win32 subdirectory from the Visual Leak Detector installation directory. Again, move it to the bottom of the list.
  • Visual C++ 6 : Go to Tools -> Options -> Directories . Select "Include files" from the "Show Directories For" drop-down menu. Add the include subdirectory from the Visual Leak Detector installation directory. Move it to the bottom of the list. Then select "Library files" from the drop-down menu and add the lib\Win32 subdirectory from the Visual Leak Detector installation directory. Again, move it to the bottom of the list.



To use VLD with your project, follow these simple steps:

  1. In at least one C/C++ source file from your program, include the vld.h header file. It should not matter which file you add the include statement to. It also should not matter in what order the header is included in relation to other headers. The only exception is stdafx.h (or any other precompiled header). A precompiled header, such as stdafx.h, must always be the first header included in a source file, so vld.h must be included after any precompiled headers.
  2. If your program contains one or more DLLs that you would also like to check for memory leaks, then also include vld.h in at least one source file from each DLL to be included in leak detection.
  3. Build the debug version of your program.



Note : Unlike earlier (pre-1.9) versions of VLD, it is now acceptable to include vld.h in every source file, or to include it in a common header that is included by many or all source files. Only one copy of the VLD code will be loaded into the process, regardless of how many source files include vld.h .

?

VLD will detect memory leaks in your program whenever you run the debug version. When you run the program under the Visual C++ debugger, a report of all the memory leaks detected will be displayed in the debugger's output window when your program exits (the report can optionally be saved to a file instead, see ReportFile under Configuration Options ). Double-clicking on a source file's line number in the memory leak report will take you to that file and line in the editor window, allowing easy navigation of the code path leading up to the allocation that resulted in the memory leak.


Note : When you build release versions of your program, VLD will not be linked into the executable. So it is safe to leave vld.h included in your source files when doing release builds. Doing so will not result in any performance degradation or any other undesirable overhead.

?

Last edited Oct 29 2011 at 5:18 PM by pramis , version 5

Using Visual Leak Detector


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 中文字幕精品一区 | 四虎影视免费永久在线观看黄 | 五月天婷婷在线视频 | 日韩黄色精品 | 久青草国产在线视频_久青草免 | 色综合社区 | 成人小视频免费 | www.激情五月.com | 国内精品一级毛片免费看 | 国产成人亚洲综合小说区 | 美女视频国产 | 91九色视频无限观看免费 | 99久久精品免费精品国产 | 香焦视频在线观看黄 | 国产视频日本 | 欧美图片一区 | 国产成人精品男人的天堂网站 | 日本护士a做爰免费观看 | 综合久久久久综合体桃花网 | 超清乱人伦中文视频在线 | 亚洲精品精品 | 国产高清视频在线免费观看 | 一级爱爱片一级毛片-一毛 一级白嫩美女毛片免费 | caoporm超免费公开视频 | www.黄黄黄 | 国产日韩亚洲欧洲一区二区三区 | 狠狠色丁香久久婷婷综 | 日日插天天操 | 欧美一级视频在线观看欧美 | 成人午夜视频免费看欧美 | 国产在线观看一区二区三区 | 国产精品亚洲综合色拍 | 久久精品免费在线观看 | 大色香蕉色视频大全 | 色偷偷成人网免费视频男人的天堂 | 深夜免费在线视频 | 久热中文字幕在线精品免费 | 99视频精品全部 在线 | 欧美韩国日本在线观看 | 中文字幕最新中文字幕中文字幕 | 国产精品久久久久久久免费大片 |