How to find a memory leak

Deleaker is a tool for Visual C++ developers designed to help them find various leak types and memory leaks in the code. For each leak it shows a full stack trace. Whenever possible, it shows the exact source file and line. Numerous options allow for finding leaks quickly and efficiently.

Deleaker can monitor both 32-bit and 64-bit code and supports all versions of Visual Studio beginning with VS 2005.

The following leak types are supported:

  • Memory: memory blocks allocated by heap functions, virtual memory, OLE memory: BSTR, SAFEARRAY, etc.
  • GDI: HBITMAP, HDC, HPEN, etc.
  • User32: HICON, HCURSOR, etc.
  • Handles: file handles, events, mutexes, etc.
  • FileView: views of file mappings.
  • ActCtxCookie: cookies of activation contexts.
  • Fiber: fibers made by CreateFiber, etc.
  • CriticalSection: critical sections (if one has called InitializeCriticalSection but forgotten to call DeleteCriticalSection).
  • EnvironmentString: ANSI and UNICODE environment strings.
  • FlsSlot: fls slots.
  • TlsSlot: tls slots.
  • Atom: atoms.