内存泄露检测工具【VLD v2.2.3】
来源:互联网 发布:粤贵银软件下载 编辑:程序博客网 时间:2024/05/22 03:23
下载地址:http://vld.codeplex.com/releases/view/82311
完装完成后会提示打开文档,然后会打开一个在线的静态帮助页面,点击Using Visual Leak Detector后有安装帮助,我用的是VC 2010 Express版本(正版的免费编译器可以自己去MS那里下载),不过这个帮助指引写的和我所用的版本有点差异,我写下自己的使用方法:
1)View->Property Manager
2)右键Debug | Win32下的Microsoft.Cpp.Win32.user选Property
3)选VC++ Directories项
4)将VLD目录下的include子文件夹添加到Include Directories里
5)将VLD目录下的lib\win32子文件夹添加到Library Directories里
PS:根据自己的软件选择添加win32还是win64
6)在自己的程序里#include <vld.h>,注意要最后包含这个头文件。
7)如果有泄露会在output窗口显示泄露,这是个例子,只new了一个内存但没有delete:
int main(int argc,char* argv[]){new int;return 0;}
WARNING: Visual Leak Detector detected memory leaks!
---------- Block 1 at 0x003A2BB0: 4 bytes ----------
Call Stack:
d:\practice\cpp\t001\test\test\main.cpp (10): test.exe!main + 0x7 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (555): test.exe!__tmainCRTStartup + 0x19 bytes
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (371): test.exe!mainCRTStartup
0x7C817077 (File and line number not available): kernel32.dll!RegisterWaitForInputIdle + 0x49 bytes
Data:
CD CD CD CD ........ ........
Visual Leak Detector detected 1 memory leak (40 bytes).
Largest number used: 40 bytes.
Total allocations: 40 bytes.
Visual Leak Detector is now exiting.
The program '[3504] test.exe: Native' has exited with code 0 (0x0).
- 内存泄露检测工具【VLD v2.2.3】
- 内存泄露检测工具【VLD v2.2.3】
- 内存泄露检测工具【VLD v2.2.3】
- 内存泄露检测工具[VLD, LeakDiag]
- 内存泄露检测工具[VLD, LeakDiag]
- 内存泄露检测工具[VLD, LeakDiag]
- 内存泄露检测工具[VLD, LeakDiag]
- vld 内存泄露检测工具vld的实现
- vld(Visual Leak Detector 内存泄露检测工具
- Qt5使用内存泄露检测工具—VLD
- vld(Visual Leak Detector) 内存泄露检测工具
- Visual C++内存泄露检测工具(VLD)
- Qt5使用内存泄露检测工具—VLD
- Visual C++内存泄露检测工具(VLD)
- Visual C++内存泄露检测工具(VLD)
- 自己实现简易的内存泄露检测工具VLD
- 实验第三方的内存泄露检测工具VLD(Visual Leak Detector)
- vld调试(内存泄露)
- Ubuntu Server 命令行下的默认语言 中文乱码
- 广播处理
- Java中的重载、重写和隐藏(续)
- RING3下 内存清零法 杀进程
- 如何将android2.1源码添加到自己的项目当中
- 内存泄露检测工具【VLD v2.2.3】
- 深入理解jQuery中$.get、$.post、$.getJSON和$.ajax的用法
- VC下动态创建了BUTTON按钮后,如何设置按钮的Modal Frame风格???
- FATE(类完全背包)
- java复制文件、文件夹
- 分享一个快速将传统表单转化为AJAX支持的表单的jQuery插件 - ALAJAX
- Django 数据库操作
- 遇到的一个诡异bug
- Linux下软件的安装与卸载