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

  • 苹果a13芯片有哪些机型(iphone a13芯片)

    苹果a13芯片有哪些机型(iphone a13芯片)

  • 华为nova6是5g手机么(华为nova6是5g嘛)

    华为nova6是5g手机么(华为nova6是5g嘛)

  • 相机专业模式的英文都是什么意思(相机专业模式的s)

    相机专业模式的英文都是什么意思(相机专业模式的s)

  • 华为荣耀9x可以升级5g(华为荣耀9X可以语音唤醒语音助手吗)

    华为荣耀9x可以升级5g(华为荣耀9X可以语音唤醒语音助手吗)

  • g1840相当于i几(赛扬g1840相当于i几)

    g1840相当于i几(赛扬g1840相当于i几)

  • 微信第三次还能解封吗(微信第三次限制登录需要几天恢复)

    微信第三次还能解封吗(微信第三次限制登录需要几天恢复)

  • 怎么删抖音喜欢的视频(怎么删抖音喜欢里面的作品)

    怎么删抖音喜欢的视频(怎么删抖音喜欢里面的作品)

  • QQ情侣空间邀请多久失效(qq情侣空间邀请多久过期)

    QQ情侣空间邀请多久失效(qq情侣空间邀请多久过期)

  • 苹果拍照没有声音(苹果手机拍照时无声音)

    苹果拍照没有声音(苹果手机拍照时无声音)

  • 抖音每天可以关注多少(抖音每天可以关注多少个人上限)

    抖音每天可以关注多少(抖音每天可以关注多少个人上限)

  • 苹果手机背景黑色怎么变白(苹果手机背景黑屏)

    苹果手机背景黑色怎么变白(苹果手机背景黑屏)

  • 平板电脑用会就重启(平板用一下就很烫什么原因)

    平板电脑用会就重启(平板用一下就很烫什么原因)

  • excel审阅模式怎么开启(excel2003审阅)

    excel审阅模式怎么开启(excel2003审阅)

  • 苹果5s支持4g网络吗(iphone 5s支持4g吗)

    苹果5s支持4g网络吗(iphone 5s支持4g吗)

  • iphonexsmax支持什么网络(iphonexsmax支持什么电话卡)

    iphonexsmax支持什么网络(iphonexsmax支持什么电话卡)

  • 手机相册图片怎么涂鸦(手机相册图片怎么上传到电脑)

    手机相册图片怎么涂鸦(手机相册图片怎么上传到电脑)

  • 腾讯视频是腾讯旗下的吗(腾讯视频官网)

    腾讯视频是腾讯旗下的吗(腾讯视频官网)

  • oppo怎么关闭breeno(oppo怎么关闭breeno识屏)

    oppo怎么关闭breeno(oppo怎么关闭breeno识屏)

  • 首汽约车司机加入条件(首汽约车司机一天挣多少钱)

    首汽约车司机加入条件(首汽约车司机一天挣多少钱)

  • 苹果8p可以下载2个微信吗(苹果8p可以下载2k吗)

    苹果8p可以下载2个微信吗(苹果8p可以下载2k吗)

  • 微信我的行程在哪里(微信我的行程足迹)

    微信我的行程在哪里(微信我的行程足迹)

  • 淘宝邮编000000在哪改(淘宝收货地址邮编000000)

    淘宝邮编000000在哪改(淘宝收货地址邮编000000)

  • aspx手机什么软件打开(aspx用什么手机软件打开)

    aspx手机什么软件打开(aspx用什么手机软件打开)

  • 电脑ctrl键的功能(电脑ctrl键的功能怎么读)

    电脑ctrl键的功能(电脑ctrl键的功能怎么读)

  • led怎么接线(led怎么接线图解视频)

    led怎么接线(led怎么接线图解视频)

  • 苹果x怎么看是不是全网通(苹果X怎么看是美版还是国行)

    苹果x怎么看是不是全网通(苹果X怎么看是美版还是国行)

  • npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolve dependency

    npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolve dependency

  • 个体工商户增值税优惠政策2023
  • 已注册登记的机动车有什么情形的
  • 履约保证金打到哪个账户
  • 无偿调入固定资产计提折旧吗
  • 小规模纳税人税率有几种
  • 本年利润每个月都转吗
  • 做账要不要入库单和出库单
  • 私营独资企业可以变更法人吗
  • 个体户购买发票需要什么资料
  • 建筑业出售废旧电脑取的收入如何申报
  • 企业利润分配核算方法
  • 房地产开发企业土地增值税清算
  • 公司股权转让应纳税额怎么算
  • 武汉房产税多少
  • 发票勾选 发票认证
  • 维护费可以留到明年抵扣吗?
  • 允许列支的捐赠比例
  • 政府回收土地要交土地增值税吗
  • 装修费算固定资产吗?
  • 购买股票的分录怎么写
  • 股权转让收到钱会计分录
  • 进货价加多少卖不亏增值税
  • 利润表没有其他业务利润
  • 制造费用在利润表体现吗
  • 分期开发是什么意思
  • 一般纳税人何种情况不需要交附加税
  • 汇算清缴报告和审计报告一样吗
  • 个人技术投资入什么科目
  • 运输费计入什么会计分录
  • 企业分配利润的原则
  • 收到无偿划拨的股权如何入账
  • 华为手机悬浮导航是干什么用
  • 如何自己打造一台高赛摩托车
  • 暂存款转结余
  • php integer
  • php imagecopymerge
  • 集体土地使用权可以抵债吗
  • 劳务派遣应纳税额如何计算
  • 购车的进项税怎么抵扣
  • vue前端代码实例
  • 城建税教育费附加什么时候交
  • 傅里叶级数狄利克雷判别法
  • 残保金交错了怎么办
  • 公司开的餐费专票可以抵扣吗
  • python字典操作 遍历
  • python如何获取列表元素
  • 补发工资个人所得税税
  • php如何判断是移动还是pc
  • 短期借款属于经营活动还是筹资活动
  • 欠对方钱对方公司已注销
  • 停工损失会计科目
  • 企业贷款的条件和流程
  • sqlserver行列转换多行多列
  • 企业返聘退休人员需要交社保吗
  • 未开票收入本月要计提增值税吗
  • 递延收益金额怎么算
  • 无偿划拨土地需要提折旧吗
  • 出口退税退的是哪些税
  • 赠送客户的商品怎么入账
  • 建筑企业工程项目物资管理驼中华
  • mac下mysql密码忘记了怎么办
  • win10开机内存就占了70 解决方法
  • win8应用商店在哪
  • win7系统回收站不见了怎么办
  • win系统找回删除文件
  • python socket操作
  • Visual Studio 2013 Tools for Unity安装目录,Visual Studio 2013 Tools.unitypackage
  • 【ExpandableListView】ExpandableListView互斥展开效果
  • DataTables+BootStrap组合使用Ajax来获取数据并且动态加载dom的方法(排序,过滤,分页等)
  • js面向对象的三大特性
  • javascript基础教学
  • jquery mobile grid
  • Jquery实现select multiple左右添加和删除功能的简单实例
  • 江苏省无犯罪证明
  • 电子税务局申请开票额度增加
  • 什么是12366
  • 浙江省国税公务员工资
  • 赞美税务干部对联大全集锦
  • 快递公司开票
  • 盈利性组织与非盈利性组织公共关系不同之处
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设