How to see (approximate) memory usage in an UWP App while it's running

拜拜、爱过 提交于 2019-12-04 07:21:32

I think you can also make use of MemoryManager class. There you can subscribe to events informing about increase/decrease of memory, set limits, as well as check memory usage of app or read reports for app or for process:

var appMemory = MemoryManager.AppMemoryUsage;
var appMemoryReport = MemoryManager.GetAppMemoryReport();
var processMemoryReport = MemoryManager.GetProcessMemoryReport();

For UWP apps there is ProcessDiagnosticInfo class available.

ProcessMemoryUsageReport mu = ProcessDiagnosticInfo.GetForCurrentProcess().MemoryUsage.GetReport();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!