1, first go to http://vld.codeplex.com/releases link Download VLD installation package, install and record the installation location
2, use vs2010 casually open a project solution, select View-"property manager , such as
3, double hit the Microsft.Cpp.Win32.user, pop up the following interface
4, click on the VC + + directory, the executable directory, including directory and library directory to add the absolute path of VLD installation location (specifically Win32 directory or Win64 directory is determined by VS, not the operating system, general selection Win32 directory)
5, save the above settings, in the need to detect memory leaks in the project to add #include<vld.h>, but must be placed under the preprocessing header file, such as "stdafx.h", after the end of the run can see if there is a memory leak
Note: The above method can set many third-party libraries globally, such as Cocos, OPENCV, etc.
VS2010 Global Configuration Vld method