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

  • qq标识如何取消(qq标识咋取消)

    qq标识如何取消(qq标识咋取消)

  • 微信如何发大于25m文件(微信如何发大于25m图片)

    微信如何发大于25m文件(微信如何发大于25m图片)

  • vivox27前置摄像头容易坏吗(vivox27前置摄像头无法收回)

    vivox27前置摄像头容易坏吗(vivox27前置摄像头无法收回)

  • 怎么在朋友圈发文字(怎么在朋友圈发定位导航)

    怎么在朋友圈发文字(怎么在朋友圈发定位导航)

  • 美团拉新用户有奖励吗(美团拉新规则)

    美团拉新用户有奖励吗(美团拉新规则)

  • 抖音里面的抽卡机会是什么(抖音抽卡2021怎么抽)

    抖音里面的抽卡机会是什么(抖音抽卡2021怎么抽)

  • 华为手机怎么设置来电视频(华为手机怎么设置下面的三个功能键)

    华为手机怎么设置来电视频(华为手机怎么设置下面的三个功能键)

  • 屏幕裂了一条缝有必要换屏吗(屏幕裂了一条缝贴膜有气泡)

    屏幕裂了一条缝有必要换屏吗(屏幕裂了一条缝贴膜有气泡)

  • 华为手机提取文字怎么弄(华为手机提取文字的功能在哪里)

    华为手机提取文字怎么弄(华为手机提取文字的功能在哪里)

  • b-f0电池是什么手机(b-f0电池是什么手机vivo)

    b-f0电池是什么手机(b-f0电池是什么手机vivo)

  • 京东已实名的账号忘了(京东实名账户)

    京东已实名的账号忘了(京东实名账户)

  • 文字分为两栏怎么操作

    文字分为两栏怎么操作

  • 微博私信删除对方能看到吗(微博私信删除对话后对方能看到吗)

    微博私信删除对方能看到吗(微博私信删除对话后对方能看到吗)

  • 9x支持人脸解锁吗(9x能不能人脸解锁)

    9x支持人脸解锁吗(9x能不能人脸解锁)

  • ipad a1432是啥型号(ipad a1432是什么型号)

    ipad a1432是啥型号(ipad a1432是什么型号)

  • 拼多多助力享免单是什么意思(拼多多助力享免单是真的吗)

    拼多多助力享免单是什么意思(拼多多助力享免单是真的吗)

  • 微信可以切换钱包地区吗(微信切换钱包地区怎么开通)

    微信可以切换钱包地区吗(微信切换钱包地区怎么开通)

  • 手机淘宝黑屏解决方法(手机淘宝总是黑屏)

    手机淘宝黑屏解决方法(手机淘宝总是黑屏)

  • 微信切换账号别人能看到吗(微信切换账号别人会退出来吗)

    微信切换账号别人能看到吗(微信切换账号别人会退出来吗)

  • 移动强制停机怎么恢复(中国移动强制停机是什么意思)

    移动强制停机怎么恢复(中国移动强制停机是什么意思)

  • 花呗逾期怎么恢复使用(花呗逾期恢复之后需要多久可以正常使用)

    花呗逾期怎么恢复使用(花呗逾期恢复之后需要多久可以正常使用)

  • 小米9开机动画怎么设置(小米9开机动画修改)

    小米9开机动画怎么设置(小米9开机动画修改)

  • 快手里的直播歌房怎么创建(快手直播放歌)

    快手里的直播歌房怎么创建(快手直播放歌)

  • 网络看不到局域网其他电脑(网络看不到局域网图标)

    网络看不到局域网其他电脑(网络看不到局域网图标)

  • Yolov5+图像分割+百度AI接口——车牌实时检测识别系统(yolov3图像识别)

    Yolov5+图像分割+百度AI接口——车牌实时检测识别系统(yolov3图像识别)

  • xlsclients命令  列出应用程序(excel&命令)

    xlsclients命令 列出应用程序(excel&命令)

  • 织梦dedecms手机站m目录下不生成index.html实现动态更新(织梦cms怎么样)

    织梦dedecms手机站m目录下不生成index.html实现动态更新(织梦cms怎么样)

  • 运输发票税率6%和3%区别在哪
  • 对外支付哪些项目需要缴税
  • 构成业务和不构成业务的会计处理
  • 记账凭证是不是会计凭证
  • 服务类收入
  • 委托收款背书和转让背书
  • 上月多计收入,本月如何调整?
  • 找贴现公司贴现有风险吗
  • 进项票异常如何自查
  • 认缴制下股权转让如何不交税
  • 优化技巧
  • 改扩建要计提折旧吗
  • 收到免税发票会影响税负吗
  • 企业可以用当月的进项票抵扣上月的销项吗?
  • 0元收购股份
  • 装饰公司发票怎么
  • 高新企业职工食堂承包方案
  • 企业收入不进公账怎样做账?
  • 农业合作社收到政府补贴做到其他收入里可以吗
  • 小规模纳税人如何缴纳企业所得税
  • 免租期租金可以追回吗
  • pavsrv51.exe - pavsrv51是什么进程 有什么用
  • php数组函数题目
  • 企业设立的条件有哪些
  • Linux系统怎么配置IP
  • uniapp登陆检查
  • php imagick
  • 什么叫非同一控制下
  • 所有者权益类的期末余额公式
  • 小企业取得存货入账价值的依据是
  • 接受股权投资账务处理
  • php获取get
  • 加计抵减是适用什么税率
  • 头歌HTML基础第一关初识HTML
  • print函数php
  • 微信小程序游戏手游排行榜
  • python里pip
  • 金税盘全额抵扣政策
  • 防伪税控开票系统安装
  • python 微信
  • 固定资产清理的借贷方向表示什么
  • 养老保险产生的利息怎么入账
  • vite 插件开发
  • 销售返利计入销售费用
  • 小规模增值税申报未开票收入怎么填
  • 股东以固定资产投资要交增值税?
  • 银行转存款怎么办
  • 支付稿费怎么做凭证
  • 收到土地使用权计入什么科目
  • 带抵扣进项分录
  • 从个人处借款的会计分录
  • 报销差旅费用什么收款凭证还是转账凭证
  • 公司车辆过户给个人有年限么
  • 支付广告费是什么活动
  • 提前还贷款要满十八岁吗
  • 委托加工业务经常出现的涉税错误有哪些
  • 数据库日期要加引号吗
  • 清空数据库中所有表的数据
  • windows2000开机视频
  • VISTA 下如何通过红外线连接外接设备 以索尼手机为例
  • linux的问题
  • win7系统运行速度提升
  • ios macos
  • windows tcp
  • 安装win7提示
  • win10无法启动diagnostic policy service
  • unity as
  • android内存优化 简书
  • node.js web
  • android平台搭建
  • js函数内置函数
  • unity 游戏
  • unity soket
  • jquery easyui开发指南
  • 超清晰的壁纸
  • checkbox批量删除
  • 安卓白屏问题有哪些
  • 南京市国家税务局
  • 欠税多少构成犯罪
  • 抄报税怎么弄
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设