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

  • 苹果手表se键盘功能怎么开启(苹果手表se键盘打字)

    苹果手表se键盘功能怎么开启(苹果手表se键盘打字)

  • 钉钉看回放能补时长吗(钉钉看回放能补满上课时间吗)

    钉钉看回放能补时长吗(钉钉看回放能补满上课时间吗)

  • vivo手机钉钉怎么没有提示音(vivo手机钉钉怎么分屏)

    vivo手机钉钉怎么没有提示音(vivo手机钉钉怎么分屏)

  • 撤销操作的快捷键(撤销操作的快捷组合键)

    撤销操作的快捷键(撤销操作的快捷组合键)

  • 腾讯会议怎么关闭自己的声音(腾讯会议怎么关闭共享屏幕)

    腾讯会议怎么关闭自己的声音(腾讯会议怎么关闭共享屏幕)

  • 苹果手机淘宝返回不了(苹果手机淘宝返回小箭头反回不了是怎么回事)

    苹果手机淘宝返回不了(苹果手机淘宝返回小箭头反回不了是怎么回事)

  • 微信收款反应慢怎么办(微信收款反应慢如何解决)

    微信收款反应慢怎么办(微信收款反应慢如何解决)

  • 计算机网络采用什么交换技术(计算机网络采用层次结构模型的好处有)

    计算机网络采用什么交换技术(计算机网络采用层次结构模型的好处有)

  • 苹果无线耳机电量怎么看(苹果无线耳机电池)

    苹果无线耳机电量怎么看(苹果无线耳机电池)

  • 5g手机装4g卡速度会快吗(5g手机装4g卡网速怎么样)

    5g手机装4g卡速度会快吗(5g手机装4g卡网速怎么样)

  • 下载列表如何保存至网盘?(怎么把下载列表放到文件)

    下载列表如何保存至网盘?(怎么把下载列表放到文件)

  • 苹果x国产屏影响使用吗(苹果x国产屏有什么缺点)

    苹果x国产屏影响使用吗(苹果x国产屏有什么缺点)

  • sdm450是什么处理器(sdm460是什么处理器)

    sdm450是什么处理器(sdm460是什么处理器)

  • 文档在电脑上和手机上显示不一样(文档在电脑上和手机微信上显示不一样)

    文档在电脑上和手机上显示不一样(文档在电脑上和手机微信上显示不一样)

  • i34130配什么主板(i34130配什么主板最好)

    i34130配什么主板(i34130配什么主板最好)

  • 华为荣耀9x忘记锁屏密码怎么办(华为荣耀9x忘记密码怎么恢复出厂设置)

    华为荣耀9x忘记锁屏密码怎么办(华为荣耀9x忘记密码怎么恢复出厂设置)

  • 3dmax默认的四个视图分别是(3dmax默认单位是什么)

    3dmax默认的四个视图分别是(3dmax默认单位是什么)

  • 蓝牙耳机蓝红灯闪烁什么意思(蓝牙耳机蓝红灯闪烁是什么意思)

    蓝牙耳机蓝红灯闪烁什么意思(蓝牙耳机蓝红灯闪烁是什么意思)

  • 腾讯云计算是什么意思(腾讯云计算中心做什么的)

    腾讯云计算是什么意思(腾讯云计算中心做什么的)

  • 华为mate30手势怎么弄

    华为mate30手势怎么弄

  • 苹果扩容对手机有影响吗(苹果扩容手机里的东西还在吗)

    苹果扩容对手机有影响吗(苹果扩容手机里的东西还在吗)

  • 荣耀7x是不是双卡(荣耀7x是不是双扬声器)

    荣耀7x是不是双卡(荣耀7x是不是双扬声器)

  • 荣耀al20是什么型号(honor al20是什么型号)

    荣耀al20是什么型号(honor al20是什么型号)

  • 华为p30pro功能介绍(华为p30pro手机功能介绍视频)

    华为p30pro功能介绍(华为p30pro手机功能介绍视频)

  • iqoo怎么开启root,iqoo手机怎么开启双系统(iqoo怎么开启无线充电)

    iqoo怎么开启root,iqoo手机怎么开启双系统(iqoo怎么开启无线充电)

  • 中了单位大奖要缴个税吗?
  • 城市维护建设税怎么做分录
  • 建筑业预缴企业所得税
  • 一般纳税人的进项税额计入成本吗
  • 不得抵扣的进项税额转出会计分录
  • 企业之间无偿借款
  • 企业所得税账务处理
  • 哪些产品计算消费税时可以扣除
  • 工会费可以个税抵扣吗
  • 房产税原价包括地价吗
  • 预收货款存入银行分录
  • 银行承兑汇票怎么取钱
  • 预收账款开票怎么做账
  • 网上购物退款后又收到产品了怎么办
  • 药品回扣2021
  • 票据权利的概念与性质
  • 会计代理服务是什么行业
  • 增值税专用发票可以开电子发票吗
  • 普通征税差额征税减按征税
  • 公司住宿费用记什么费用
  • 土地闲置费可以税前扣除吗
  • 暂估入库库存出现负数怎么办?
  • 服务,不动产和无形资产扣除项目明细
  • 哪些人需缴纳个人所得税
  • 会议展览服务费需要交印花税吗
  • 免征增值税的税额还要交个人所得税吗
  • 废旧物资回收企业税收管理
  • 上月留底的进项税额本月转出做什么分录
  • 调整增值税税率
  • 无线电路问题
  • 跨年期许
  • 如何清除苹果手机6s垃圾
  • 纳税人转让不动产增值税征收管理暂行办
  • php图形用户界面
  • phpnow升级php版本
  • 报废机器设备会计分录
  • 土地出让金返还比例是多少
  • 图像自动生成
  • 瑞吉接送
  • 什么是进项税转出成本
  • 劳务公司需要缴纳社保吗
  • 利得税表一定要做审计吗?
  • Discus X 3 门户改造熊掌号网页教程
  • 公司没有车加油费怎么报
  • 政府给的补偿款怎么做账
  • 单位产品税金计算公式
  • 企业承担残疾比例是多少
  • SQLServer2005 Output子句获取刚插入的ID值
  • 员工发放福利会计分录
  • 报废车补贴政策2023
  • 简易计税差额抵扣
  • 银行的存单丢失了可以补办吗
  • 社会组织志愿者参观泉州华侨历史博物馆
  • 已抵扣进项怎么转出
  • 小规模纳税人购进税控收款机
  • 增值税专票开具与发票专用章保管
  • 施工单位购买材料能直接进成本吗
  • 工资里计提五险什么意思
  • 飞机票电子发票可以抵扣进项税吗
  • 股东是否实缴出资的举证责任
  • 物流货到付款可以吗
  • 64位win7怎么释放为硬件保留的内存?
  • 查看win8.1版本
  • fragmentize
  • Unity3d OnApplicationPause与OnApplicationFocus 判断游戏暂停还是重新启动
  • 在微信支付宝借贷会影响征信吗
  • jquery和dom对象之间怎么转换
  • jq转盘抽奖
  • Android之framework修改底部导航栏NavigationBar动态显示和隐藏
  • js弹出小窗口
  • ug怎么加载制图模板
  • 夯实基础怎么读
  • python基础教程chm
  • python打包可执行pyx
  • python守护线程与非守护线程
  • 拟录用和录用的区别在哪
  • 长期挂账的其他应付款的规定
  • 化妆品的消费税税率为15%的比例税率
  • 土地面积测量
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设