I've inherited some terrible MSXML parsing code (which sadly I don't have time to rewrite). This code is full of COM interface/BSTR leaks where the original authors have either misused manual COM reference counting (which always seems to end in tears) or where they've used COM smart pointers but used them wrongly such that leaks have occurred.
I've now fixed many of the leaks in the code but I'm still finding that msxml3.dll isn't unloaded when I call CoUninitialize() (which it should be if all the interfaces have gone) and more memory is being used than I expect after this code has run.
I'm now reaching the limit of what I can spot by hand, and I'm looking round for a debugging solution that can identify these kinds of leaks. I've used umdh in the past with good effect to spot conventional leaks but this doesn't seem terribly helpful with COM leaks. Can anyone recommend a good approach?