An MFC application is reporting many memory leaks at exit using MFC's internal mem leak checker.
Running Inspector didn't reveal those leaks.
I've read that MFC can falsly report leaks because linked DLLs allocate memory before MFC's memory tracker becomes active.
I tried linking to MFC's DLLs first via linker options (confirmed by viewing the linker output in VERBOSE mode). MFC links first but the leaks are still showing.
The application is linked with several boost DLLs as well as 2-3 user DLLs which are not MFC DLLs.
Happens also when boost is linked statically.
Just opening and closing the application dumps many (tens) small leaked objects in the output window by MFC's memory leak tracker.
All the reported leaks are simple pointers (not MFC objects) and no reference to the originating source code.
I have a few questions:
1) Does MFC use a custom allocator (e.g. not malloc) and thus fools Inspector XE?
2) Can I somehow disable MFC's special memory allocator in debug builds?
3) Are the leaks reported falsely by MFC if Inspector XE says nothing's wrong?
Setup:
* Window 7 64 bit sp1
* VS2012 and VS2010
* Building 64 bit MFC application
* Boost 1.52 either dynamically or statically linked.
* Intel Parallel Studio XE 2013 update 1
If anyone has a suggestion, please share :)




