how to get the memory that my app taken in MAUI?

mc 5,141 Reputation points
2025-02-06T10:09:54.9+00:00

in MAUI how to get the memory that my APP taken in ios?

my APP will be released when open another APP

I think my APP take too many memory so the system GC it.

now I want to confirm it

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,915 questions
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 35,351 Reputation points Microsoft Vendor
    2025-02-07T07:20:24.7433333+00:00

    Hello,

    in MAUI how to get the memory that my APP taken in ios?

    You could get the available memory by the following code:

    var m =  NSProcessInfo.ProcessInfo.PhysicalMemory;// available
    var g = System.GC.GetTotalMemory(false);//total
    

    For more details, you could see

    GC.GetTotalMemory(Boolean) Method (System) | Microsoft Learn

    physicalMemory | Apple Developer Documentation

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.