Visual Leak Detector
Enhanced Memory Leak Detection for Visual C++
Project maintained by KindDragon
Hosted on GitHub Pages — Theme by mattgraham
Introduction
Visual C++ provides built-in memory leak detection, but its capabilities are minimal at best. This memory leak detector was created as a free alternative to the built-in memory leak detector provided with Visual C++. Here are some of Visual Leak Detector’s features, none of which exist in the built-in detector:
- Provides a complete stack trace for each leaked block, including source file and line number information when available.
- Detects most, if not all, types of in-process memory leaks including COM-based leaks, and pure Win32 heap-based leaks.
- Selected modules (DLLs or even the main EXE) can be excluded from leak detection.
- Provides complete data dumps (in hex and ASCII) of leaked blocks.
- Customizable memory leak report: can be saved to a file or sent to the debugger and can include a variable level of detail.
Other after-market leak detectors for Visual C++ are already available. But most of the really popular ones, like Purify and BoundsChecker, are very expensive. A few free alternatives exist, but they’re often too intrusive, restrictive, or unreliable. Visual Leak Detector is currently the only freely available memory leak detector for Visual C++ that provides all of the above professional-level features packaged neatly in an easy-to-use library.
Visual Leak Detector is licensed free of charge as a service to the Windows developer community. If you find it to be useful and would like to just say “Thanks!”, or you think it stinks and would like to say “This thing sucks!”, please feel free to drop us a note. Or, if you’d prefer, you can contribute a small donation. Both are very appreciated.
Documentation
Read the documentation at https://github.com/KindDragon/vld/wiki
Latest release
v2.5.1 - 2017-10-17
2.5.1
Enhancements:
Bugs Fixed:
- Fix ntdll loader patch for Windows 10 (1607) Anniversary Update causing crashes (thanks to @ioannis-e).
- Vld dll loading order fixed with MFC.
- Suppressible msgboxes in setup with cmdline /silent /suppressmsgboxes.
2.5
Enhancements:
- VS2015 support added.
- Windows 10 support added.
- Support MFC 12 MBCS (thanks to @mnissl).
- VLD config through env. vars (thanks to @akaStiX).
- Support detection DllMain allocations (thanks to @ioannis-e).
- Add option to skip reporting crt startup allocations as memory leaks (thanks to @ioannis-e).
- Improve the vld.ini searching from additional locations (thanks to @ioannis-e).
- Changed implementation of FastCallStack::getStackTrace for 32-bit code.
Bugs Fixed:
- Fix #9519, #9859, #10544, use LoaderLock to serialize any calls which load additional libraries or require access to the Loader Lock (thanks to @ioannis-e).
- Fix #6359, #10553, fix crashes and failure to register COM dlls where Visual Leak Detector is unloaded before IMalloc interface is released (thanks to @ioannis-e).
- Fix #10548, vld.ini search path (thanks to @ioannis-e).
- Fix #10587, Visual Leak Detector reporting strange leaks in CRT module of VC++ (thanks to @ioannis-e).
- Fix #10588, false positives from CRT in VS2013 with /MTd (thanks to @ioannis-e).
- Deadlock fixed with StackWalkMethod=safe.
Contributing
We encourage developers who’ve added their own features, or fixed bugs they’ve found, to contribute to the project. The full version-controlled source tree is available publicly via Git at the URL below. Feel free to clone from this URL and submit patches for consideration for inclusion in future versions. You can also issue pull requests for changes that you’ve made and would like to share.