How can we detect memory leaks in a COM Interop application?

What would be the best way to identify memory management issues with a C # winform application that uses COM interoperability. The COM node is referenced, and its methods are used for many calculations and transactions.

Is there any tool that can identify [interop] objects that are loaded into memory but not unloaded.

+4
source share
2 answers

RCW for a COM component is just a managed class. Any semi-decent .NET memory profiler will show you which one will remain unintentional. If the COM server itself is leaking, you will need one that can track unmanaged memory. This invariably requires source code for the server so that you can pinpoint what happened. And actually something to do about it.

There are already gazillion questions about .NET profilers. Type ".NET Memory Profiler" in the search field in the upper right corner.

+1
source

Try AQTime profiler, I play with it for some time, and it has good profilers for unmanaged (com) and managed application, you can download demo here: http://smartbear.com/products/development-tools/performance- profiling / sign-up /

0
source

Source: https://habr.com/ru/post/1345354/


All Articles