How to monitor Memory CPU usage by Objects in C#

Hakan
Hakan used Ask the Experts™
on
Hello,

I'm using COM object in my application and i'd like to make some changes on my methods and would like to see how is the change so are there any tool in Visual Studio to track this ?

Any help would be grateful.

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Eduard GherguArchitect - Coder - Mentor

Commented:
Hi,
Can you be more descriptive regarding the changes?

Author

Commented:
I'll check don't know very well. When everything iss finished it shows high memory usage at COM process at Task Manager i think i have to find a solution for that but first which object keeps high space in memory.
Eduard GherguArchitect - Coder - Mentor

Commented:
Hi,
The COM server is getting deallocated after it is no longer used? It's provided by a third party or do you have control over it? It's built using  .NET or you don't know?
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Shaun VermaakSenior Consultant
Awarded 2017
Distinguished Expert 2018

Commented:
Why not use Visual Studio's Diagnostic Tools?
vsdiagnostic.png

Author

Commented:
@Eduard, It's a third party, and how is it possible to understand is it allocated?
Architect - Coder - Mentor
Commented:
Hi,
The COM components can run in-process (.dll) or out-of-process (.exe). In your case, it runs in-process. Being a dynamically loaded library, the Windows loader will read the dll and load it in the app memory space when you'll use one of the functions exposed by this dll. You can read more here: https://support.microsoft.com/en-us/help/815065/what-is-a-dll
One (easy) way is to use the Profiling support included in Visual Studio: https://docs.microsoft.com/en-us/visualstudio/profiling/profiling-feature-tour?view=vs-2019
The difficult way is to use the command-line tools included in Windows SDK or Windows DDK. You can find a good information lint here: http://windbg.org/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial