c++visual-studiomemory-leaksvisual-leak-detector

Visual Leak Detector does not print any leak compared to crtdbg


i've search a lot for this question, but could find a solution yet for it.

I recently downloaded VLD 2.5 and compiled it from scratch, both for Visual Studio 2013 and 2015. Before I'd use it in my projects I thought i run the tests provided by the package. But all the tests fail.

Same behavior for all the test suites, reported at https://vld.codeplex.com/workitem/10617

The MFC-Test application outputs the following: Output of vldmfc.exe

The point here is: CRT detects the leaks, a CString object allocated by the application, VLD don't.

What am I missing ?


Solution

  • Found the solution for it. Global Flags are set permanently. You need to reset them in case of such an error.

    Look in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager and reset GlobalFlag to 0 (or use gflags.exe).

    Cheers, luis.