一、安装vld-2.5.1-setup.exe

        下载地址:https://archive.codeplex.com/?p=vld

二、pro中添加头文件目录与库目录

INCLUDEPATH += "C:\\Program Files (x86)\\Visual Leak Detector\\include"


LIBS += "C:\\Program Files (x86)\\Visual Leak Detector\\lib\Win32\\vld.lib"

三、代码中添加头文件

#include <vld.h>

四、无内存泄漏时,显示如下:

No memory leaks detected.

Visual Leak Detector is now exiting.

---------------------

作者:刀剑の神君

版权声明:本文为博主原创文章,转载请附上博文链接!