Using Silverlight Memory

Is there a way to measure the current memory usage of the silverlight plugin from client side C # code?

I isolate a memory leak, and it would be useful to know the current memory usage of the plugin.

For example, it can be registered in a file before I press the button when it uses β€œ60 mb”, and after I clicked the button, it used β€œ70 mb”, etc. Then I could gradually add controls and use this method to quantify the leak.


As I said above,

I am looking more for a C # silverlight library call that I can call in my code to get the current memory usage at any given moment in time.

So, I assume there is no way to do this?

In winforms (and probably WPF), I find this possible, but perhaps the stripped-down nature of Silverlight precluded this functionality?

+3
source share
2 answers

GC.GetTotalMemory can help you.

+1
source
0
source

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


All Articles