I'm using Microsoft Excel interop in a windows service application to generate excel reports. Since I'm using interop assembly, need to ensure there are no memory leaks.
I have tried to handle the memory leaks through code by disposing (close, quit, assign null) all excel interop components like worksheet, workbook, excel application. But i want to confirm whether the fix to handle memory leak scenarios is working properly.
For this purpose, I'm using performance monitor tool and added .Net CLR interop pointing to windows service counter to the performance monitor. But, I'm not sure on how to confirm or validate for the metrics defined such as # of stubs, # of CCWs. What should be the values of the metrics that could confirm that there are no memory leaks in the windows service application using Microsoft Excel interop libraries.
Please suggest the method to confirm or calculate that there are no memory leaks using performance monitor.