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

  • 微信朋友圈视频多长时间(微信朋友圈视频怎么下载)

    微信朋友圈视频多长时间(微信朋友圈视频怎么下载)

  • 支付宝我的家编辑角色对方能看到吗(支付宝 我的家)

    支付宝我的家编辑角色对方能看到吗(支付宝 我的家)

  • 虎牙蓝管有什么权限(虎牙蓝管有什么用)

    虎牙蓝管有什么权限(虎牙蓝管有什么用)

  • 快手账号别人搜索不到(快手搜索别人快手号搜不到是什么情况)

    快手账号别人搜索不到(快手搜索别人快手号搜不到是什么情况)

  • airpods进水后如何处理(airpods进水后能去修好吗)

    airpods进水后如何处理(airpods进水后能去修好吗)

  • 生成支付订单失败(生成支付订单失败是什么原因)

    生成支付订单失败(生成支付订单失败是什么原因)

  • 勿扰模式有来电记录吗(勿扰模式来电话会震动吗)

    勿扰模式有来电记录吗(勿扰模式来电话会震动吗)

  • 什么软件可以下载视频到本地(什么软件可以下载国际服手游)

    什么软件可以下载视频到本地(什么软件可以下载国际服手游)

  • 移动花卡微信免流吗(移动花卡微信免不免流量)

    移动花卡微信免流吗(移动花卡微信免不免流量)

  • 苹果阻止来电对方会听到什么(苹果阻止来电对方发短信可以发出去吗)

    苹果阻止来电对方会听到什么(苹果阻止来电对方发短信可以发出去吗)

  • 关闭显示器是什么意思(关闭显示器按哪个键)

    关闭显示器是什么意思(关闭显示器按哪个键)

  • 2015052是什么型号(20150501是什么星座)

    2015052是什么型号(20150501是什么星座)

  • ps软件不联网可以用吗(ps软件不联网可以使用吗)

    ps软件不联网可以用吗(ps软件不联网可以使用吗)

  • vivox9手机卡顿反应慢怎么办(vivox9很卡)

    vivox9手机卡顿反应慢怎么办(vivox9很卡)

  • ps图片怎么变成灰色(ps图片怎么变成cad线稿)

    ps图片怎么变成灰色(ps图片怎么变成cad线稿)

  • ps径向渐变怎么用(ps径向渐变怎么弄)

    ps径向渐变怎么用(ps径向渐变怎么弄)

  • 华为荣耀v9有人脸识别吗(华为荣耀v9手机)

    华为荣耀v9有人脸识别吗(华为荣耀v9手机)

  • oppo手机的相机打不开了怎么办(oppo手机的相机权限在哪里打开)

    oppo手机的相机打不开了怎么办(oppo手机的相机权限在哪里打开)

  • 淘集集推广怎么做(淘集集怎么赚钱)

    淘集集推广怎么做(淘集集怎么赚钱)

  • 新版Edge浏览器开启“标签页预览”功能(新版edge浏览器极速模式)

    新版Edge浏览器开启“标签页预览”功能(新版edge浏览器极速模式)

  • 远程主机强迫关闭了一个现有的连接(远程主机强迫关闭了现有连接我的世界)

    远程主机强迫关闭了一个现有的连接(远程主机强迫关闭了现有连接我的世界)

  • re.findall() 的用法(re.findall()用法)

    re.findall() 的用法(re.findall()用法)

  • 怎样创建一个VUE项目(超简单)(怎样创建一个网站)

    怎样创建一个VUE项目(超简单)(怎样创建一个网站)

  • 什一税是什么意思?
  • 存货减值税务处理
  • 更正申报多交的个税
  • 摄影服务的开票项目
  • 记账人和复核人是一个人吗
  • 会计差错更正流程
  • 养老机构提供的养老服务免增值税吗
  • 工资核算方式
  • 管理人员的奖惩制度
  • 信用卡产生滞纳金
  • 购进免税农产品怎么计算进项税额
  • 会务费 发票
  • 劳务票一般开几个点
  • 年所得12万以下还用年度申报吗
  • 可以背书转让的公司
  • 未开发票申报
  • 计提福利费会计科目
  • 长期待摊费用的计算公式
  • 消防工程改造需要什么资质
  • 电脑装系统分区出现错误
  • 解聘员工补偿金能拖欠吗
  • chrome插件扩展名
  • 公民什么情况纳税
  • 牛顿地名
  • php 自动加载
  • 哈士奇新手礼包
  • 海峡群岛属于哪个洲
  • 陈列费用明细表怎么做
  • CUDA版本选择
  • Delete `␍` 最简单最有效的解决方法和解释(VScode)
  • defaultpool
  • 增值税纳税申报操作流程
  • 应付职工薪酬多栏式
  • 物流小规模企业有哪些
  • 养殖场租赁发票图片
  • 运费计入什么会计分录
  • 织梦怎么添加相关
  • RedHat6.5/CentOS6.5安装Mysql5.7.20的教程详解
  • mysqldump -s
  • 公司注册后一直没有申报
  • 揭秘蟹卡骗局
  • 小规模企业可以抵扣进项税吗
  • 小规模纳税人能开专票吗2023
  • 以前年度损益调整借贷方向
  • 含税金额和税额的关系
  • 车船税手续费返还时间
  • 现金池管理
  • 出差的住宿费能抵扣吗
  • 无形资产摊销账面价值
  • 支付货款退回如何处理
  • 建筑材料资源税
  • 合同里包括产品和服务吗
  • 报销核销
  • 自产自用进项税额
  • 用友u8怎样查询上个月凭证
  • 收据和收款收据的法律效力
  • 工业增值税怎么算
  • 企业如何建账之类的账目
  • mysql存储引擎的作用
  • mysql怎么修改列的类型
  • centos6 rpm
  • vs2013运行
  • 怎么降到windows7
  • win8怎么查看系统信息
  • win10 ie8浏览器
  • win7怎么下到u盘
  • win8怎么设置时间自动更新
  • 微信小程序实现查询功能
  • nodejs 爬虫
  • shell 生成随机数每次运行都不一样
  • js中的函数怎么使用
  • JavaScript中的方法名不区分大小写
  • bootstrap和css的关系
  • 面向对象的java语言
  • javascript消息对话框
  • Windows下python2.7.8安装图文教程
  • 用jquery
  • 张江税务所地址
  • 工业生产和农业生产区别
  • 2021年江苏省考常州职位表
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设