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

  • 微信打语音过去对方忙线中怎么回事(微信打语音过去显示对方忙啥意思)

    微信打语音过去对方忙线中怎么回事(微信打语音过去显示对方忙啥意思)

  • 抖音如何设置不让别人看到自己是否在线(抖音如何设置不感兴趣的内容)

    抖音如何设置不让别人看到自己是否在线(抖音如何设置不感兴趣的内容)

  • iphone的天气无法显示(iphone天气无法使用)

    iphone的天气无法显示(iphone天气无法使用)

  • 华为p30卡槽打不开(华为p30卡槽打不了电话)

    华为p30卡槽打不开(华为p30卡槽打不了电话)

  • vivox50上市时间(vivox50 上市)

    vivox50上市时间(vivox50 上市)

  • 小米笔记本m3和i5区别(小米笔记本m3怎么样)

    小米笔记本m3和i5区别(小米笔记本m3怎么样)

  • 注册微信号需要身份证号码吗(注册微信号需要身份证信息吗)

    注册微信号需要身份证号码吗(注册微信号需要身份证信息吗)

  • qq邮箱自动回复一天几次(Qq邮箱自动回复怎么设置)

    qq邮箱自动回复一天几次(Qq邮箱自动回复怎么设置)

  • 删除温控会有什么后果(删除温控会有什么影响)

    删除温控会有什么后果(删除温控会有什么影响)

  • 群公告发出后怎么撤回(群公告发完之后进来的人能看见吗?)

    群公告发出后怎么撤回(群公告发完之后进来的人能看见吗?)

  • 宿舍没有wifi怎么办(宿舍没有wifi怎么用投影仪)

    宿舍没有wifi怎么办(宿舍没有wifi怎么用投影仪)

  • 快手怎样提现才不要验证码(快手怎样提现才是真的)

    快手怎样提现才不要验证码(快手怎样提现才是真的)

  • 荣耀20与20s手机壳一样吗(荣耀20和荣耀20s)

    荣耀20与20s手机壳一样吗(荣耀20和荣耀20s)

  • 11pro跟11promax区别(11pro和11promax区别在哪里)

    11pro跟11promax区别(11pro和11promax区别在哪里)

  • 抖音头像尺寸是多少(抖音头像尺寸是多少px)

    抖音头像尺寸是多少(抖音头像尺寸是多少px)

  • 增量下载怎么解决(增量下载设置在哪)

    增量下载怎么解决(增量下载设置在哪)

  • 抖音换手机了怎么登录(抖音换手机了怎么登录原来的号)

    抖音换手机了怎么登录(抖音换手机了怎么登录原来的号)

  • ios13怎么信任软件(ios13.6怎么信任软件)

    ios13怎么信任软件(ios13.6怎么信任软件)

  • 苹果6sp有没有必要升ios13(6sp还在用)

    苹果6sp有没有必要升ios13(6sp还在用)

  • 电脑上怎么找ie浏览器(电脑上怎么找id地址)

    电脑上怎么找ie浏览器(电脑上怎么找id地址)

  • 有电话号码能查到身份证吗(有电话号码能查到快递信息吗)

    有电话号码能查到身份证吗(有电话号码能查到快递信息吗)

  • qq音乐买单曲是永久的吗(qq音乐买单曲有什么用)

    qq音乐买单曲是永久的吗(qq音乐买单曲有什么用)

  • 苹果11pro max尺寸(苹果11pro max尺寸长宽多少厘米)

    苹果11pro max尺寸(苹果11pro max尺寸长宽多少厘米)

  • airpods可以调音量吗(airpods可以调声音嘛)

    airpods可以调音量吗(airpods可以调声音嘛)

  • 微软发布最新Win10 KB5005716补丁直接升级Win11(微软发布新windows)

    微软发布最新Win10 KB5005716补丁直接升级Win11(微软发布新windows)

  • 在win7中,本地连接无法禁止或开启该怎么解决?(win7的本地连接在哪)

    在win7中,本地连接无法禁止或开启该怎么解决?(win7的本地连接在哪)

  • 企业生产经营管理包括哪些
  • 商品房价格居高不下的原因
  • 个人开具劳务费增值税发票
  • 金税三期电子发票怎么领取
  • 金蝶系统如何设置套打
  • 上年其他应付款本年度付了怎么做账
  • 公司员工受伤怎么报工伤
  • 去年购进的货物今年才收到发票
  • 长期待摊费用可以抵扣吗
  • 社保岗位补贴条件
  • 建安企业增值税预缴
  • 企业分立房产税税收政策
  • 五证合一后地税编码怎么查
  • 人民法院被收买了怎么办
  • 生产设备投资入股增值税
  • 房地产开发成本测算套表(全过程)
  • windows10更新怎么办
  • 苹果手机上显示
  • 房屋出租预收租金房产税纳税义务发生时间
  • deepin 设置
  • 保险公司工伤保险
  • MacOS Big Sur 11.3网页怎么设置时间限制?
  • 苹果mac双系统按住哪个键
  • 收到客户预付的保费90000元,存入银行
  • git可以管理二进制文件吗
  • vue3 + Tailwind Css + Vite 搭建快速开发前端样式环境
  • file php
  • vue经典案例
  • 增值税会自动申报吗
  • 关于固定资产管理
  • thinkphp update方法
  • 法院判定支付对方诉讼费,我可以入账吗
  • sql语句的基本用法
  • 核销已计提坏账的应收账款
  • 报关单运费cny
  • 公司主营业务怎么介绍
  • 营业外收支核算的内容有哪些?
  • 加计抵减退税的会计分录
  • php接口技术
  • 织梦是啥
  • 工程公司的材料员考试难吗
  • 既开发票又开收据是有财务风险吗?
  • 哪些进项税不允许从销项税额中抵扣
  • 资产负债表调整事项
  • 冲回多提的坏账准备会计分录
  • 代垫电费收回开票吗
  • 收到残障金退回怎么处理
  • 取得收入未开具发票
  • 预付工程款会计分录
  • 行政事业单位拨款请示在前还是发票在前
  • 其他权益工具包括交易性金融资产吗
  • 股权转让印花税减半征收政策
  • 担保公司预计负债
  • 工资计提数小于发放数,如何处理
  • 企业给职工提供的免费住房是不是合法住宅?
  • 实收资本小于注册资本账务处理
  • 会计凭证数字书写模板
  • 营改增的增值税
  • 初中学历学会计难不难
  • 资产减值损失是费用吗
  • SQL Server AlwaysOn读写分离配置图文教程
  • sql server的实例
  • ubuntu系统自动获取ip
  • 苹果手机价格
  • mac安装路径选择
  • win8 开机启动
  • linux修改ipv6地址
  • win7系统局域网无法看到其他电脑
  • windows日历
  • vi 技巧
  • win10 20h2怎么更新
  • 详解杭州亚运会会徽和口号
  • css颜色值正确的表达形式
  • python中urllib.unquote乱码的原因与解决方法
  • cls方法可以清除
  • 猫的所有视频
  • 基于javascript的毕业设计选题
  • 怎么将安卓
  • jquery操作元素样式
  • 广州2021社保费
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设