After installation, it can be used with any C/C++ project simply by adding the following line to the code:
#include <vld.h>
When the program is executed under the Visual Studio debugger, Visual Leak Detector will output a memory leak report of the executed segment of the code, at the end of the debugging session. If memory leaks are detected, this report will point to the exact locations in the code segment, which allocated the leaked memory block.
The header file can be easily isolated from rest of the source codes by guarding it with the pre-processor directive block. It can be made further user friendly by defining a separate Visual Studio build configuration for VLD. The steps are as follows.