位置: 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设置背景图片填充)

  • 2017年微信公众号发展趋势(2018年公众号)

    2017年微信公众号发展趋势(2018年公众号)

  • 魅族18x怎么设置应用分身(魅族18x怎么设置双击锁屏)

    魅族18x怎么设置应用分身(魅族18x怎么设置双击锁屏)

  • vivos6如何恢复出厂设置(vivo6s恢复出厂设置)

    vivos6如何恢复出厂设置(vivo6s恢复出厂设置)

  • 微信电脑版怎么下载(微信电脑版怎么锁定)

    微信电脑版怎么下载(微信电脑版怎么锁定)

  • 魅族16th电池容量(魅族16 电池容量)

    魅族16th电池容量(魅族16 电池容量)

  • 华为nova6可以设置锁屏显示时间吗(华为nova6可以设置充电提示音吗)

    华为nova6可以设置锁屏显示时间吗(华为nova6可以设置充电提示音吗)

  • 手机wps繁体转简体怎么弄(手机wps繁体转简体不见了)

    手机wps繁体转简体怎么弄(手机wps繁体转简体不见了)

  • 苹果手机被禁止获取免费APP怎么办(苹果手机被禁止获取免费APP是什么原因)

    苹果手机被禁止获取免费APP怎么办(苹果手机被禁止获取免费APP是什么原因)

  • 美篇可以加音频吗(美篇可以加音频吗怎么弄)

    美篇可以加音频吗(美篇可以加音频吗怎么弄)

  • pr剪辑出现红色一帧怎么解决(pr剪辑时总是出现红色)

    pr剪辑出现红色一帧怎么解决(pr剪辑时总是出现红色)

  • 飞利浦屏幕控制锁定怎么解除(飞利浦屏幕控制锁定)

    飞利浦屏幕控制锁定怎么解除(飞利浦屏幕控制锁定)

  • 抖音账号无法绑定微信(抖音账号无法绑定qq)

    抖音账号无法绑定微信(抖音账号无法绑定qq)

  • 华为w09平板是什么型号(华为w09平板是什么型号多少尺寸)

    华为w09平板是什么型号(华为w09平板是什么型号多少尺寸)

  • iqoopro支持红外吗(iqoopro支持红外遥控吗)

    iqoopro支持红外吗(iqoopro支持红外遥控吗)

  • 苹果app下载怎么设置指纹(苹果app下载怎么设置不需要密码)

    苹果app下载怎么设置指纹(苹果app下载怎么设置不需要密码)

  • 拼多多免拼成功啥意思(拼多多免拼成功后怎么取消订单)

    拼多多免拼成功啥意思(拼多多免拼成功后怎么取消订单)

  • 苹果a2223是什么意思(苹果a2223是什么尺寸)

    苹果a2223是什么意思(苹果a2223是什么尺寸)

  • atx12v是什么接口

    atx12v是什么接口

  • 荣耀v20呼吸灯怎么设置(荣耀x20手机呼吸灯)

    荣耀v20呼吸灯怎么设置(荣耀x20手机呼吸灯)

  • 魅族小溪设置(魅族小溪有什么功能)

    魅族小溪设置(魅族小溪有什么功能)

  • oppoa9x手机怎么截屏(oppoa9x手机怎么设置锁屏时间模式)

    oppoa9x手机怎么截屏(oppoa9x手机怎么设置锁屏时间模式)

  • s1电池容量多大(五号电池多大)

    s1电池容量多大(五号电池多大)

  • 苹果无线耳机如何配对(苹果无线耳机如何开机)

    苹果无线耳机如何配对(苹果无线耳机如何开机)

  • linux设置默认网关教程(linux 设置默认路由)

    linux设置默认网关教程(linux 设置默认路由)

  • 电脑怎样进入cmos,设置cmos方法介绍(电脑怎样进入cmos设置)

    电脑怎样进入cmos,设置cmos方法介绍(电脑怎样进入cmos设置)

  • 买房契税如何计算
  • abc类企业是什么意思
  • 利润为负数利润增长率怎么算
  • 餐饮服务属于什么票据类型
  • 金税盘证书口令被锁死自己能解吗
  • 30人以上的企业有哪些
  • 小规模纳税人减征额怎么计算
  • 应税职工福利费在应纳税所得额里面吗
  • 外商投资企业土地使用税什么时候交
  • 施工机械保险费属于什么费用
  • 注销时其他应付款余额怎么账务处理
  • 专项资金可以存定期吗
  • 一般纳税人支出的钱没有发票年底怎么处理
  • 广告业福利发放会计处理怎么做?
  • 法院退诉讼费账务处理
  • 办公楼贷款比例
  • 内部企业借款利息在建工程资本化
  • 收到货款确认收入但是后期开票了怎么做分录
  • 聘用人员工资福利待遇
  • 公司给客户退款会计分录
  • 营改增后企业取得的不动产可以抵扣进项
  • 住宿费可以抵扣吗?
  • 技术开发合同免征企业所得税吗
  • 已知不含税金额和增值税如何计算税率
  • 当企业预收款项无需退回
  • 休眠文件大小设置
  • win10怎么设置win7开始菜单
  • linux docx
  • pruttct.exe - pruttct是什么进程 有什么用
  • 一次性支付一年租金怎么做账
  • avgcc32.exe进程是什么文件产生的 avgcc32进程信息查询
  • 木星应该涂什么颜色
  • google谷歌浏览器下载电脑版
  • php魔术方法的讲解与使用
  • 解决问题
  • rsa前端解密
  • vscode调试在哪
  • js示例
  • 旅行发票可以做账吗
  • 哪些税费需要计提
  • python PyQt如何使用资源
  • windows PostgreSQL 9.1 安装详细步骤
  • 企业付给个人工资怎么算
  • 定期定额个税申报应税项和计税依据为什么不相等
  • 进口货物如何支付外汇
  • 外商投资企业 外资企业
  • 小规模纳税人可以抵扣进项税吗
  • 个人所得税专项扣除2023最新政策
  • 固定资产提取折旧最新规定
  • 小规模纳税人转一般纳税人当月如何申报
  • 收到法人的借款怎样写摘要
  • 出差人员的住宿费计入什么科目
  • 个人社保代扣业务是什么意思
  • 跨期发票会计处理
  • 在哪找从平台消费的人
  • 加计抵减政策15%声明
  • 物业管理企业应当与居委会共同做好什么工作
  • 做会计的步骤
  • 侧边栏应用
  • win7总是更新怎么办
  • mac苹果电脑如何开4个微信号
  • 用U盘安装苹果系统
  • Ubuntu Server 13.10 安装配置图解教程
  • SonicStageMonitoring.exe是什么进程 有什么作用
  • ubuntu系统怎么安装微信
  • 如何使用调制解调器
  • win7如何设置屏幕保护时间
  • win7系统怎么禁用开机启动项
  • linux ls命令什么意思
  • 微软windows10正版
  • Linux服务器无法远程连接
  • shell判断文件
  • nodejs libuv
  • 查看shell脚本是否在运行
  • 批处理打开网络连接
  • unity2019图集
  • 如何用python编写脚本
  • activate webstorm
  • 1+x职业技能等级证书
  • 个人所得税代扣代缴手续费返还政策
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设