Using VLD2.5, and VS2015 on an empty project is showing 9 memory leaks.
I presume that this is a bug in VLD 2.5?
In VS2015 Enterprise, I've created an MFC Single Dialog app using the wizard.
Simply running the app, then closing the app reports leaks:
Visual Leak Detector detected 9 memory leaks (1656 bytes).
Largest number used: 13634 bytes.
Total allocations: 49384 bytes.
Visual Leak Detector is now exiting.
I've attached the complete output from VLD.
Comments: Thank you for looking into this, I can confirm that by moving the #include "vld.h" line to be the first entry in the stdafx.h file, that has solved the issue, and I no longer see the false memory leaks. It looks like something has changed then since previous versions of VLD as it used to work fine by including the vld.h in any of the source files. The help documentation probably needs updating to reflect this change, as it currently states: > Note: Unlike earlier (pre-1.9) versions of VLD, it is now acceptable to include vld.h in every source file, or to include it in a common header that is included by many or all source files. Only one copy of the VLD code will be loaded into the process, regardless of how many source files include vld.h. Thanks again for your help.
I presume that this is a bug in VLD 2.5?
In VS2015 Enterprise, I've created an MFC Single Dialog app using the wizard.
Simply running the app, then closing the app reports leaks:
Visual Leak Detector detected 9 memory leaks (1656 bytes).
Largest number used: 13634 bytes.
Total allocations: 49384 bytes.
Visual Leak Detector is now exiting.
I've attached the complete output from VLD.
Comments: Thank you for looking into this, I can confirm that by moving the #include "vld.h" line to be the first entry in the stdafx.h file, that has solved the issue, and I no longer see the false memory leaks. It looks like something has changed then since previous versions of VLD as it used to work fine by including the vld.h in any of the source files. The help documentation probably needs updating to reflect this change, as it currently states: > Note: Unlike earlier (pre-1.9) versions of VLD, it is now acceptable to include vld.h in every source file, or to include it in a common header that is included by many or all source files. Only one copy of the VLD code will be loaded into the process, regardless of how many source files include vld.h. Thanks again for your help.