I have a .NET application that interops with native dll with following layers.
a) C++ API GetNames() returns a list of wchar_t instances
b) C++/CLI API GetNames2() code calls into C++ API, marshall the list of wchar into .NET string, return this .NET string list
c) managed code C# calling interop layer GetNames2() API and display list of string
I am calling CoTaskMemFree API in interop layer to free natives wchar strings. However I am just wondering how to see memory leak caused by a missing CoTaskMemFree call. So I commented out call to CoTaskMemFree. In this case my understanding is that if I attach windbg and run !address -summary command, any allocations done on the native side (that haven't been freed) should be shown under RegionUsageHeap but it does not seem to report it. Any ideas how can I see native memory usage (in context of managed code) within windbg?