Quantcast
Channel: Visual Leak Detector for Visual C++ 2008-2015
Viewing all articles
Browse latest Browse all 704

Commented Unassigned: Empty MFC Single Dialog App reports 9 leaks [10595]

$
0
0
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: From the review of the VLD output, the reason that 9 leaks are reported related to the fact that __NO debug symbols were loaded__. For example: ``` 'MFCVLDTest.exe' (Win32): Loaded 'C:\Windows\SysWOW64\mfc140ud.dll'. Cannot find or open the PDB file. ``` This reuslts in functions in mfc140ud.dll not to be resolved, and to appear as memory addresses, for example: ``` Leak Hash: 0x37ED79D7, Count: 1, Total 92 bytes Call Stack (TID 38472): ucrtbased.dll!malloc_dbg() mfc140ud.dll!0x0F552C85() mfc140ud.dll!0x0F954C59() mfc140ud.dll!0x0F950A26() mfc140ud.dll!0x0F94EAE3() mfc140ud.dll!0x0F502CEB() mfc140ud.dll!0x0F501B29() mfc140ud.dll!0x0F459166() mfc140ud.dll!0x0F7109A0() c:\users\editor\documents\visual studio 2015\projects\mfcvldtest\mfcvldtest\mfcvldtest.cpp (72): MFCVLDTest.exe!CMFCVLDTestApp::InitInstance() mfc140ud.dll!0x0F956A5E() f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\appmodul.cpp (26): MFCVLDTest.exe!wWinMain() ``` In order to properly identify startup CRT allocations VLD requires the loading of debug symbols thus in Visual Studio (``Tools > Options > Debugging > Symbols``) you must configure the ``Cache symbols in this directory`` and __enable downloading symbols__ from ``Microsoft Symbol Servers`` or __manually download__ the debug symbols from Microsoft website and install in the cache symbols directory. I hope this explains and can resolve your predicament.

Viewing all articles
Browse latest Browse all 704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>