Page 1 of 1

Windows memory leak detection tool

Posted: Tue Jan 22, 2019 4:25 am
by youyou
Under Windows, Visual Leak Detector tool is used in combination with VS to detect
the location of memory Leak quickly and conveniently.
The download is at http://vld.codeplex.com/

Re: Windows memory leak detection tool

Posted: Tue Jan 22, 2019 4:25 am
by youyou
After the installation is complete, in Visual C++ IDE "tools"-->"options"-->"project and solutions"-->"VC++ directories",
"include files" increase VLD "\the include path", "libraries" increase VLD "\lib\Win32"path,
in addition dynamic libraries "\bin\Win32 path" has been added to the environment variables when installed inside,
if not add, you need to manually copy "\bin\Win32" file to the project under the Debug directory.

Re: Windows memory leak detection tool

Posted: Tue Jan 22, 2019 4:25 am
by youyou
Create WIN32 project example:

# include "stdafx.h"

# include "VLD.h"

Int _tmain(int argc, _TCHAR* argv[])
{
Char *pBuf = new char[200];
Return 0;
}

Re: Windows memory leak detection tool

Posted: Tue Jan 22, 2019 4:26 am
by youyou
In addition, if you want to locate a memory leak in a dynamic library loaded by the main program,
you also need to add LIB and header files to the dynamic library.

Re: Windows memory leak detection tool

Posted: Thu Feb 14, 2019 5:32 am
by kuafu
It's very useful.
We use it to dectection memory leak for JCIDE.