I was investigating a memory leak with the application written in C# & C++. Once I have isolated it to couple of C++ components with PerfMon log and WinDbg/SOS debugging I tried to use UMDH (gflags enabled with +ust) to compare snapshots and find out which heap allocations were leaking memory.
At end the leak was found by a manual review of code. The sample code snippet below.
char *p = new char[size];
// use the pointer
delete p; <---- MEMORY LEAK
I was wondering why UMDH didn't catch this ? UMDH never reported this as an issue in the comparison log. Would WinDbg heap commmands would have helped to point out the leak ?