位置: IT常识 - 正文

Using Visual Leak Detector

编辑:rootadmin
Visual Leak Detector for Visual C++ 2008/2010/2012Using Visual Leak DetectorThis section briefly des Using Visual Leak Detector

推荐整理分享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. Using Visual Leak Detector

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

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. 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. 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

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.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.

本文链接地址:https://www.jiuchutong.com/zhishi/303683.html 转载请保留说明!

上一篇:最强MacBook苹果笔记本macos电脑应用Sublime Text 4代码编辑器傻瓜汉化教程(哪一款macbook)

下一篇:CSS设置背景图片不显示的解决方法(css设置背景图片填充)

  • 小米mix4怎么设置深色模式(小米Mix4怎么设置振动)

    小米mix4怎么设置深色模式(小米Mix4怎么设置振动)

  • 钉钉视频会议怎么看其他人画面(钉钉视频会议怎么静音)

    钉钉视频会议怎么看其他人画面(钉钉视频会议怎么静音)

  • 苹果手机时间秒数怎么显示(苹果手机时间秒表在哪里)

    苹果手机时间秒数怎么显示(苹果手机时间秒表在哪里)

  • 淘宝晚到必赔是什么意思(淘宝晚到必赔是不是要等收货后)

    淘宝晚到必赔是什么意思(淘宝晚到必赔是不是要等收货后)

  • iqoo3多少hz刷新率(iqoo3是90hz刷新吗)

    iqoo3多少hz刷新率(iqoo3是90hz刷新吗)

  • 抖音点赞多少上热门(抖音点赞多少上热搜)

    抖音点赞多少上热门(抖音点赞多少上热搜)

  • 苹果手机玩一会发热怎么回事(苹果手机玩一会儿就很烫是什么原因)

    苹果手机玩一会发热怎么回事(苹果手机玩一会儿就很烫是什么原因)

  • 淘宝标品和非标品的区别(淘宝标品和非标品的运营重点是什么)

    淘宝标品和非标品的区别(淘宝标品和非标品的运营重点是什么)

  • 苹果官网电池保养方法(苹果官网电池保修服务)

    苹果官网电池保养方法(苹果官网电池保修服务)

  • 手机蓝光是什么意思(手机蓝光是指蓝色的光吗)

    手机蓝光是什么意思(手机蓝光是指蓝色的光吗)

  • 华为vie一al10参数(华为vie–al10参数价格)

    华为vie一al10参数(华为vie–al10参数价格)

  • 8p声音特别小怎么回事(8p声音特别小怎么办)

    8p声音特别小怎么回事(8p声音特别小怎么办)

  • flutter是什么(flutter干什么的)

    flutter是什么(flutter干什么的)

  • 超买是什么信号(超买与超买什么意思)

    超买是什么信号(超买与超买什么意思)

  • word2010的默认扩展名是(word 2010文档默认的扩展名为( ))

    word2010的默认扩展名是(word 2010文档默认的扩展名为( ))

  • 4g打开volte是什么意思(4g volte)

    4g打开volte是什么意思(4g volte)

  • word文档打不进去字(pdf怎么变成word)

    word文档打不进去字(pdf怎么变成word)

  • 手机怎么注销qq号(手机怎么注销qq吃鸡账号)

    手机怎么注销qq号(手机怎么注销qq吃鸡账号)

  • wps两个字和三个字对齐(wps两个字和三个字)

    wps两个字和三个字对齐(wps两个字和三个字)

  • 小米6多少瓦快充(小米6支持多少w快充最高)

    小米6多少瓦快充(小米6支持多少w快充最高)

  • 淘宝账户被保护怎么办(淘宝账户被保护怎么回事)

    淘宝账户被保护怎么办(淘宝账户被保护怎么回事)

  • 小米笔记本256要分区吗(小米笔记本32g)

    小米笔记本256要分区吗(小米笔记本32g)

  • 幻灯片如何设置自动播放(幻灯片如何设置一个一个出来)

    幻灯片如何设置自动播放(幻灯片如何设置一个一个出来)

  • usb供电不足怎么办(usb供电不正常)

    usb供电不足怎么办(usb供电不正常)

  • VS Code报错:无法将“xxx”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。(vs code no such file or directory)

    VS Code报错:无法将“xxx”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。(vs code no such file or directory)

  • php static的三种使用方法(php static变量)

    php static的三种使用方法(php static变量)

  • 一般纳税人缴税
  • 材料报废是否可以税前扣除
  • 原材料的采购成本包括运费吗
  • 注册登记费用属于什么科目
  • 税务结清后多少时间内工商需要注销
  • 股东退股退本金及利润
  • 公司购买煤炭的会计分录
  • 哪个会计科目必须对全部项目发函证
  • 中标服务费计入什么会计科目
  • 报销单用法
  • 市区增值税附征怎么填
  • 成本模式的投资性房地产折旧计入什么
  • 银行卡酒店消费有记录吗
  • 公司账户存定期 定期要做利息出纳账吗
  • 固定资产的计税基础6种情况
  • 纳税人识别码是啥
  • 建筑行业预算
  • 税控技术服务费计入什么科目
  • 贴现的利息能不能取出来
  • 过渡期税收优惠政策
  • 退税入其他收益需要再缴税吗
  • 外购已抵扣进项税额
  • 费用,资产,成本,损失的区别
  • 技术转让收入属于主营业务收入吗
  • 进口增值税13可以抵扣多少
  • 工地买东西怎么记账
  • 推广费属于什么科目
  • windows10安装net3.5不成功怎么办
  • 王者荣耀进不去怎么回事最新
  • 如何理解内容
  • 公司试乘试驾车管理
  • 苹果手机系统升级后电量消耗快
  • 存货跌价准备的计提
  • php时间不对
  • 财务费用为负数是好事还是坏事
  • 人力资源外包可以去吗
  • PHP5.5.15+Apache2.4.10+MySQL5.6.20配置方法分享
  • 二次封装机
  • torchaudio教程
  • 智慧工厂协同管控下载
  • 下载下来是php
  • php设置title
  • 公司资金转到法人帐户
  • 金税盘中的发票修复是什么意思
  • 开具培训类发票需要哪些条件?
  • 织梦tag标签怎么用
  • 进项税都有什么
  • 缴纳工会筹备金会计分录怎么写
  • 临时用工费用计入什么会计科目
  • 跨年取得的发票金额大于暂估金额
  • 教育费附加减免性质代码
  • 客户是否需要向客户介绍
  • 税务师报名条件和要求
  • 不动产进项税额不再分两年抵扣
  • 跨年工程施工如何计算成本
  • 去年漏记了收入,可以记今年吗
  • 机床上的配件计入什么费用
  • 核销报验登记流程
  • 年底汇算清缴是什么
  • 租赁办公楼
  • 营业税金及附加和税金及附加有什么区别
  • mysql优化参数详解
  • 批量游标
  • MySQL中interactive_timeout和wait_timeout的区别
  • 哪个是win8.1更新win10的补丁
  • 正版vista一键升级win7
  • linux搭建l2tp服务器
  • 电脑怎么装双系统win10和linux
  • cocos2dx怎么读
  • android内存工具
  • 中间件 .net
  • unity data
  • android线程状态
  • python中pyinstaller
  • android设计模式单例有几种
  • 对超市的建议和意见怎么写简短
  • 江苏电子税务局客服电话
  • 彩票中奖归出钱人还是中奖人
  • 云南省地方税务局关于城镇土地使用税
  • 个人所得税申报怎么申报
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设