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

  • iphone13数据线是typec吗

    iphone13数据线是typec吗

  • 支付宝怎么绑定营业执照(支付宝怎么绑定亲情号付款)

    支付宝怎么绑定营业执照(支付宝怎么绑定亲情号付款)

  • 企业钉钉注册流程(钉钉企业注册需要什么手续吗)

    企业钉钉注册流程(钉钉企业注册需要什么手续吗)

  • 笔记本电脑控制面板失灵(笔记本电脑控制面板在哪里打开)

    笔记本电脑控制面板失灵(笔记本电脑控制面板在哪里打开)

  • 电动车充电器正负极接反了会怎样(电动车充电器正极接电瓶的正极吗)

    电动车充电器正负极接反了会怎样(电动车充电器正极接电瓶的正极吗)

  • oms系统是什么意思(oms是什么体系标准)

    oms系统是什么意思(oms是什么体系标准)

  • 装机需要哪些配件(装机需要哪些配件和材料)

    装机需要哪些配件(装机需要哪些配件和材料)

  • 抖音充不了币怎么回事(抖音充不进抖币)

    抖音充不了币怎么回事(抖音充不进抖币)

  • 抖音上私信发的视频怎么保存(抖音上私信发的视频不保存到相册)

    抖音上私信发的视频怎么保存(抖音上私信发的视频不保存到相册)

  • 快手权重是啥意思(什么是快手权重)

    快手权重是啥意思(什么是快手权重)

  • 手机出厂时默认会是哪个版本(手机出厂时默认是哪个版本)

    手机出厂时默认会是哪个版本(手机出厂时默认是哪个版本)

  • 台式电脑的摄像头在笔记本电脑上能不能用(台式电脑的摄像头怎么调试远近)

    台式电脑的摄像头在笔记本电脑上能不能用(台式电脑的摄像头怎么调试远近)

  • 秘乐怎么发自己的视频(秘乐怎么卖)

    秘乐怎么发自己的视频(秘乐怎么卖)

  • 苹果哪几款支持nfc(苹果哪几款支持快充)

    苹果哪几款支持nfc(苹果哪几款支持快充)

  • 暴风电视蓝屏怎么解决(暴风电视蓝屏怎么办啊)

    暴风电视蓝屏怎么解决(暴风电视蓝屏怎么办啊)

  • 华为荣耀手机怎么添加桌面插件(华为荣耀手机怎么截屏)

    华为荣耀手机怎么添加桌面插件(华为荣耀手机怎么截屏)

  • ipadmini5能打电话吗(ipad mini6 可以打电话)

    ipadmini5能打电话吗(ipad mini6 可以打电话)

  • 10gbps等于多少mbps(10gbps等于多少MB/s速度)

    10gbps等于多少mbps(10gbps等于多少MB/s速度)

  • 筛选快捷键ctrl加什么(筛选快捷键ctrl大全)

    筛选快捷键ctrl加什么(筛选快捷键ctrl大全)

  • 苹果11防水不(苹果14plus防水吗)

    苹果11防水不(苹果14plus防水吗)

  • 苹果手机能反向充电吗(苹果手机能反向给耳机充电吗)

    苹果手机能反向充电吗(苹果手机能反向给耳机充电吗)

  • 如何把软件放入sd卡(如何把软件放入隐私空间)

    如何把软件放入sd卡(如何把软件放入隐私空间)

  • 小米8充电特效怎么设置(小米8充电特效在哪)

    小米8充电特效怎么设置(小米8充电特效在哪)

  • pavkre.exe - pavkre是什么进程 作用是什么

    pavkre.exe - pavkre是什么进程 作用是什么

  • phpcms怎么添加模板(phpcms模板制作教程)

    phpcms怎么添加模板(phpcms模板制作教程)

  • 附加税减免要做哪些科目
  • 租金收入个税怎么交
  • 公司购买员工意外保险费会计分录未收到发票
  • 公共汽车出租车
  • 经济利益的流入一定是收入吗
  • 财务报表没有申报表
  • 电子发票上的字体大小
  • 会计核算过程中的计量尺度通常有
  • 商业零售企业实行增值税后购进商品业务的账务处理
  • 工程暂估价超了怎么办
  • 开工程服务发票后怎么成本
  • 年收入12万申报人数
  • 雇主责任险会计分录
  • 如何确定连锁店的纳税地点?
  • 闲置的房屋可以计提折旧吗
  • 增值税发票红冲后增值税销项为负数
  • 工程项目关闭
  • 企业修路会计分录
  • 合并报表的少数股东权益分录
  • 坏账准备对利润表
  • linux中!
  • win10玩游戏太卡了
  • 固定资产报废能报保险公司理赔吗
  • 长期闲置的机器叫什么
  • 认缴出资额日期没有是什么意思
  • php利用云片网实现短信验证码功能的示例代码
  • 如何在qq好友旁边打字
  • linux 创建sh
  • html页面中利用______标签可引入jquery库
  • php://filter协议
  • PHP:proc_terminate()的用法_命令行函数
  • 会计账簿的启用规则
  • 分配股利怎么算
  • php批量处理数据
  • React面试题最全
  • php sleep函数
  • tcpreplay命令详解
  • 税款已缴纳后发票怎么查
  • 劳动仲裁要出钱吗
  • 高速费发票可以重开吗
  • mysql备份导入
  • 税务登记需要的手续
  • 资产负债表其他应付款怎么填
  • 如何网上填报个人所得税
  • 白酒消费税最低计税价格核定范围包括
  • 工资是什么?包括哪些
  • 主营业务成本的摘要怎么写
  • 调整以前年度损益调整什么时候结转
  • 个体小企业怎么缴纳个人所得税
  • 民办非企业单位工会经费
  • 营改增后服务业账务处理
  • 福利费可以直接入管理费用吗
  • 没有收入有支出怎么处理账务
  • 财务费用利息属于什么科目
  • 为什么小规模纳税人少
  • 员工异地工作
  • 报表其他非流动资产
  • 办理国有土地使用证
  • 新成立的公司工会经费免交一年吗
  • 发票开多了如何做凭证?
  • 出纳建账账户名称怎么写
  • mysql几天能学会
  • 如何删除windows.old
  • vnc远程桌面linux
  • win10 ie无法使用
  • inodecmn.exe
  • win8怎么固定桌面图标
  • win10系统电脑关机自动重启
  • Bootstrap与KnockoutJs相结合实现分页效果实例详解
  • js响应式布局
  • uiview继承哪个类
  • jquery ul li
  • win10安装node.js
  • javascript性能优化写法
  • javascript中的类型转换
  • 基于python的研究
  • 国家税务局浙江省电子税务局新版
  • 土地增值税有哪些税收抵扣
  • 网上申报增值税纳税申报表怎么填写
  • 车辆购置税二维码扫描用什么扫
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设