Have been testing a little, and so far it is only std::string leaks that fails to be handled. The reason for this is probably that when linking to CRT dlls, then basic_string is imported from the CRT dll instead of creating a template instance.

The VLD also fails to detect std::string leaks without use of global new and delete operator. It only detects them when linking to the static CRT lib. Would be nice if one could specify that one didn't want the CRT dll basic_string import.

uld be activated even if _DEBUG was not defined (comment out the ifdef). It seems VLD is able to hook the HeapAlloc, HeapFree no matter if in debug or release mode.H

After the operator override code is added, memory leak checking is working. Could you tell me why we need to add this extra code? I can't find the difference between debug and release which is related to this operator override
code.

VLD will in debug builds automatically hook the allocator methods in the CRT runtime, so you don't need to override the global operator new and delete.

If VLD is not able to function in debug mode, then you should create an issue.

My quest is to make the VLD work in release builds, as some memory leaks only occurs in the wild, where debug builds are not possible. Also release builds are a lot faster than debug builds even with no optimization enabled.

Hi. We apply your patch. Can you try build VLD from latest source code without redefining global new and delete operators in your project? I want remove VLDReportAlloc and VLDReportFree, If that will work.

Just tried to use the latest version of VLD on my main application, and it now creates an endless loop in _HeapDestroy(), because when calling the "real" HeapDestroy, then it enters _HeapDestroy again.

I tried to call HeapDestroy from the TestSuite, but the endless loop could not be reproduced. My main application is COM+ application where an exe-file calls into a COM+ dll. It is during initialization that the endless loop occurs.