Another interesting repro is this:
Create a new project using the 'MFC Application' template, and add a leak somewhere (say in the InitInstance) like
Now go on project properties and change the 'Common Language Runtime Support' option from 'No Common Language Runtime Support' to 'Common Language Runtime Support (/clr)'
The builtin leak detection will still report the leak.
But if you enable vld (by adding #include "vld.h") you will have a sad
Create a new project using the 'MFC Application' template, and add a leak somewhere (say in the InitInstance) like
BOOL CSimpleMfcAppApp::InitInstance()
{
int* thisShouldLeak = new int(5);
...
As expected, this gets reported by both the default leak detection and by vld if enabled. Now go on project properties and change the 'Common Language Runtime Support' option from 'No Common Language Runtime Support' to 'Common Language Runtime Support (/clr)'
The builtin leak detection will still report the leak.
But if you enable vld (by adding #include "vld.h") you will have a sad
No memory leaks detected.
Visual Leak Detector is now exiting.
Let me know if there is anything I can do to help fixing this