版权声明:原创文章。转载请注明出处。本博新地址www.iaccepted.net https://blog.csdn.net/IAccepted/article/details/27646679

Visual Leak Detector is a free, robust, open-source memory leak detection system for Visual C++.

It's pretty easy to use. After installing it, you just need to tell Visual C++ where to find the included header and library file.

Then it can be used with any C/C++ project simply by adding the following line to your code:
#include <vld.h> 

When you run your program under the Visual Studio debugger, Visual Leak Detector will output a memory leak report at the end of your debugging session. The leak report includes the full call stack showing how any leaked memory blocks were allocated. Double-click
on a line in the call stack to jump to that file and line in the editor window.

It's a very effective way to quickly diagnose, and fix, memory leaks in C/C++ applications.

The
main difference between the CRT
Debug Library and VLD, is
that Visual Leak Detector shows you
the complete callstack used
for memory allocation has
led to the leak.

For example:

---------- Block 1199 at 0x04BE1058: 136 bytes ----------
Call Stack:
d:\Foobar\FooLog.cpp (26): FooLog::getInstance
d:\Foobar\FooMain.cpp (75): FooMain::init
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (578): __tmainCRTStartup
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (403): WinMainCRTStartup
0x759A3677 (File and line number not available): BaseThreadInitThunk
0x770C9D42 (File and line number not available): RtlInitializeExceptionChain
0x770C9D15 (File and line number not available): RtlInitializeExceptionChain
Data:
9C 33 2D 6B 74 2A 2D 6B C8 11 BE 04 00 00 00 00 .3-kt*-k ........
00 00 00 00 70 14 BB 6C 70 14 BB 6C 00 00 00 00 ....p..l p..l....
00 00 00 00 68 14 BB 6C 68 14 BB 6C 00 00 00 00 ....h..l h..l....
00 00 00 00 6C 14 BB 6C 6C 14 BB 6C 20 12 BE 04 ....l..l l..l....
00 00 00 00 CD 00 CD CD 00 00 00 00 01 CD CD CD ........ ........
68 14 BB 6C 78 33 2D 6B 00 00 00 00 00 00 00 00 h..lx3-k ........
00 00 00 00 01 02 00 00 06 00 00 00 00 00 00 00 ........ ........
00 00 00 00 00 00 00 00 88 11 BE 04 5C 10 BE 04 ........ ....\...
00 00 00 00 20 CD CD CD ........ ........

YES,it's so easy,what we need to do is just include <vld.h>,then the information of

 memory leaking will be shown on the screen.

此工具0积分下载地址:
visual leak detector

vs2008内存泄露检測得到完美解决的更多相关文章

  1. 内存泄露检測及cvClone造成的泄露

    调了几个小时,到最后发现内存泄露的原因是opencv的cvClone函数,採用cvCopy函数后,问题解决. vs2010使用vld进行内存泄露检測 (1) 下载vld工具 (2) 将D:\Progr ...

  2. Visual Studio内存泄露检測工具

    使用简单介绍     在敲代码的过程中.难免会遇到内存泄露的时候.这个时候假设手工查找内存泄露,不说方法没有通用的,就是真的要自己手工查找也是非常耗时间和精力的.诚然.我们能够借助一些工具,并且我们还 ...

  3. C++内存泄露检測原理

    转自:http://hi.baidu.com/jasonlyy/item/9ca0cecf2c8f113a99b4981c 本文针对 linux 下的 C++ 程序的内存泄漏的检測方法及事实上现进行探 ...

  4. c++程序内存泄露检測工具

    功能: 用于检測c++程序的内存泄露. 原理: 事实上非常easy,就是通过函数的重载机制,捕获应用程序的new, new[] , delete , delete[], malloc,calloc,f ...

  5. Linux C 编程内存泄露检測工具(二):memwatch

    Memwatch简单介绍 在三种检測工具其中,设置最简单的算是memwatch,和dmalloc一样,它能检測未释放的内存.同一段内存被释放多次.位址存取错误及不当使用未分配之内存区域.请往http: ...

  6. Visual C++ 2012/2013的内存溢出检測工具

    在过去,每次编写C/C++程序的时候,VLD差点儿是我的标配.有了它,就能够放心地敲代码,随时发现内存溢出. VLD最高可支持到Visual Studio 2012.不知道以后会不会支持Visual ...

  7. Android内存泄漏检測与MAT使用

    公司相关项目须要进行内存优化.所以整理了一些分析内存泄漏的知识以及工作分析过程. 本文中不会刻意的编写一个内存泄漏的程序,然后利用工具去分析它.而是通过介绍相关概念,来分析怎样寻找内存泄漏.并附上自己 ...

  8. LeakCanary:简单粗暴的内存泄漏检測工具

    差点儿每一个程序猿在开发的过程中都会遇到内存泄漏.那么我们怎样检測到app是否哪里出现内存泄漏呢?square公司推出了一款简单粗暴的检測内存泄漏的工具-- LeakCanary 什么是内存泄漏? 内 ...

  9. MySQL常见内存不足启动失败的完美解决方法

    Move to https://www.jb51.net/article/136432.htm

随机推荐

  1. www.jqhtml.com 前端框架特效

    www.jqhtml.com * 请选择课程 初级班 (PS.HTML.CSS.静态网站项目实战) 中级班 JavaScript基础.JavaScript DOM.jQuery.JS进阶.HTML5和 ...

  2. Yapi学习笔记

    . 下载源码:https://github.com/YMFE/yapi 2. 安装MongoDB数据库,下载地址:链接:https://pan.baidu.com/s/1bZKlcy 密码:ah3n ...

  3. [PHP]算法-替换空格的PHP实现

    替换空格: 请实现一个函数,将一个字符串中的每个空格替换成“%20”.例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy. 思路: 1.先循环一遍,找出 ...

  4. Linux-kill命令和killall命令(11)

    kill:指定将信号发送给某个进程,常用来杀掉进程,可以通过ps.top命令来查看进程 在默认情况下: 采用编号为的TERM信号.TERM信号将终止所有不能捕获该信号的进程. 对于那些可以捕获该信号的 ...

  5. jQuery合并同一列中相同文本的相邻单元格

    一.效果图 二.在html的head中引入jQuery <script language="javascript" src="${pageContext.reque ...

  6. Java中变量之局部变量、本类成员变量、父类成员变量的访问方法

    变量:局部变量.本类成员变量.父类成员变量 如何访问:如果变量名相同,则采用就近原则,哪个变量离所要调用的访问最近,那就么就输出,优先顺序为:局部变量 > 本类成员变量 > 父类成员变量 ...

  7. minitab的鱼骨图的制作

    Minitab的操作路径为:主菜单Stat > Quality Tools > Cause-and-Effect 先分别选择列"Man.Machine.Material.Meth ...

  8. C# 填充Excel

    1.添加引用 Microsoft.Office.Interop.Excel; 2.使用命名空间 using Microsoft.Office.Interop.Excel; 3.填充EXCEL单元格方法 ...

  9. Linux常用基本命令:三剑客命令之-awk模式用法(1)

    再次回顾一下,awk基本语法格式: awk [options] 'Pattern {Action}' file1 file2 ··· 之前的文章有讲过两种Pattern(BEGIN, END),本文, ...

  10. 每个JavaScript工程师都应懂的33个概念

    摘要: 基础很重要啊! 原文:33 concepts every JavaScript developer should know 译文:每个 JavaScript 工程师都应懂的33个概念 作者:s ...