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

  • excel底纹的设置方法是什么(excel底纹设置为标题1样式)

    excel底纹的设置方法是什么(excel底纹设置为标题1样式)

  • 笔记本电脑配件有哪些(笔记本电脑配件在哪买)

    笔记本电脑配件有哪些(笔记本电脑配件在哪买)

  • 手机电池可以换吗(手机电池可以换几次)

    手机电池可以换吗(手机电池可以换几次)

  • 手机号注销之后微信还可以用吗(手机号注销之后打电话提示什么)

    手机号注销之后微信还可以用吗(手机号注销之后打电话提示什么)

  • 数据库系统和数据库管理系统的区别(数据库系统和数据库管理系统的关系)

    数据库系统和数据库管理系统的区别(数据库系统和数据库管理系统的关系)

  • 怎么下载快手里的视频(怎么下载两个快手)

    怎么下载快手里的视频(怎么下载两个快手)

  • 手机软膜的优缺点(手机软膜叫什么膜)

    手机软膜的优缺点(手机软膜叫什么膜)

  • 网页缩小快捷键是什么(网页缩小快捷键ctrl加什么)

    网页缩小快捷键是什么(网页缩小快捷键ctrl加什么)

  • 小米8突然耗电变快了(小米突然耗电太快官方解决方法)

    小米8突然耗电变快了(小米突然耗电太快官方解决方法)

  • 爱奇艺怎么设置屏幕比例(爱奇艺怎么设置跳过开头和结尾)

    爱奇艺怎么设置屏幕比例(爱奇艺怎么设置跳过开头和结尾)

  • 抖音不想被某人关注怎么办(抖音不想被某人艾特)

    抖音不想被某人关注怎么办(抖音不想被某人艾特)

  • 爱奇艺和奇异果的区别(爱奇艺和奇异果的会员能通用吗)

    爱奇艺和奇异果的区别(爱奇艺和奇异果的会员能通用吗)

  • dc插孔是什么意思(dc插孔是什么意思呀)

    dc插孔是什么意思(dc插孔是什么意思呀)

  • 苹果8机身长多少厘米(苹果八机身尺寸)

    苹果8机身长多少厘米(苹果八机身尺寸)

  • 京东签到提醒如何取消(京东签到在哪儿)

    京东签到提醒如何取消(京东签到在哪儿)

  • 米8如何开启闪充模式(小米8的闪光灯在哪里设置)

    米8如何开启闪充模式(小米8的闪光灯在哪里设置)

  • 荣耀9xpro防水吗(荣耀x9防水吗?)

    荣耀9xpro防水吗(荣耀x9防水吗?)

  • 苹果11怎么没有小圆点(苹果11怎么没有传输或还原iPhone)

    苹果11怎么没有小圆点(苹果11怎么没有传输或还原iPhone)

  • iphone11用的是京东方的屏吗(iphone11用的什么)

    iphone11用的是京东方的屏吗(iphone11用的什么)

  • 天翼看家支持几部终端(天翼看家支持几个手机)

    天翼看家支持几部终端(天翼看家支持几个手机)

  • 用ps快速美白人物照片(用ps快速美白人物)

    用ps快速美白人物照片(用ps快速美白人物)

  • 如何鉴别小米8翻新机(如何鉴别小米13真假)

    如何鉴别小米8翻新机(如何鉴别小米13真假)

  • vivoiqoo如何截屏(vivoiqoo手机怎么截屏快捷键是什么)

    vivoiqoo如何截屏(vivoiqoo手机怎么截屏快捷键是什么)

  • 华为鸿蒙系统怎么安装虫虫助手app?鸿蒙系统安装虫虫助手app详细步骤(华为鸿蒙系统怎么样)

    华为鸿蒙系统怎么安装虫虫助手app?鸿蒙系统安装虫虫助手app详细步骤(华为鸿蒙系统怎么样)

  • win10磁盘碎片整理教程(win10磁盘碎片整理打不开)

    win10磁盘碎片整理教程(win10磁盘碎片整理打不开)

  • 所得税汇算清缴报告在哪查
  • 应交消费税的税目
  • 广告公司 印刷
  • 代开运输发票会不会造成重复征税
  • 现金流量表填报说明
  • 进项抵扣的金额怎么算
  • 金税盘忘了清盘怎么办
  • 购买的二手车可以抵扣进项税额吗
  • 现金日记账划线更正法
  • 注册资本认缴与实缴会计如何做账
  • 技术服务费属于现代服务吗
  • 进项转出后还能转入吗
  • 香港公司在大陆设立子公司
  • 营改增后租金如何交税
  • 可以给行政事业单位开增值税专用发票吗
  • 当期损益包括营业外收支吗
  • 工会经费的纳税依据
  • 个人借款取得的利息收入要交税吗
  • 应交增值税进项税额转出
  • 进项税额转出怎么填申报表
  • 一万元国债一年多少利息
  • 政府补贴物业公司
  • 残疾人保障金工资总额包括社保吗
  • 个人业务费是什么
  • 应付款项余额
  • 桌面图标变成了一张纸
  • 欠款利息收入如何入账
  • 工程公司项目经理年薪一般多少
  • PHP:mb_encode_mimeheader()的用法_mbstring函数
  • 在php中,字符串有哪些表示形式
  • linux网络接口状态命令
  • 预计可变现净值影响账面价值吗
  • 补充养老保险税前扣除标准与扣除比例
  • anaconda更改虚拟环境路径
  • 会计核算中 制度有哪些
  • 财税2016年12号文件解读
  • 安装多版本chrome
  • 大模型时代的自然语言处理
  • unet模型代码matlab
  • php路径问题
  • 固定资产多少钱以上才要计提折旧
  • 公司注销公司名下的房子怎么办
  • 工程增值税怎么算,知道9%的税率
  • 办理税控盘
  • mysql 随机取出一条
  • 金税盘一天可以开多少张发票
  • 原材料的主要账务处理
  • 债权投资相关科目
  • 先抵扣后付款怎么做账
  • 收到现金怎么记账凭证
  • 出口转内销会计分录举例
  • 政府补助的会计准则
  • 建筑安装工程承包合同条例还有效吗
  • 辅助生产车间的制造费用不通过制造费用核算
  • 房地产开发企业销售自行开发的房地产项目
  • 工程设计费收入在所得税申报表应填入
  • 企业的支出包括( )支出
  • 新旧收入准则对比区别表
  • 企业预提费用是什么科目
  • win7与xp文件共享
  • 雨林木风Windows10
  • linux怎么操作文件
  • mac字体发虚解决办法
  • linux中docker
  • win10预览版21277下载
  • linux ii
  • .json()
  • webpack基本使用
  • PHP+MySQL+jQuery随意拖动层并即时保存拖动位置实例讲解
  • 安卓专业图片处理软件
  • css命名大全
  • perl脚本输出变量
  • div+css网页布局方法
  • python选择器
  • 百度贴吧上传图片大小
  • ug编程代码意思
  • 请问在javascript程序中
  • python调用fortran函数传入数组
  • 海口社保一个月多少钱
  • 中国税务报订阅电话
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设