Is there a way to check available memory to avoid "Insufficient memory" error. RRS feed

  • Question

  • An app has some optional actions that use quite some memory. Is there a way to check the available memory so it can be determined whether to perform the actions?  This is for preventing the following exception:

    "Insufficient memory to continue the execution of the program windows store app".


    Monday, April 14, 2014 3:46 PM

All replies

  • Checking for available memory isn't how you prevent this problem. OOM exceptions are an indication that you're leaking memory or are loading too much simultaneously.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, April 14, 2014 7:16 PM
  • How would I know that an app is loading too much?

    I will try performing the tasks in series instead of spawning multiple threads to do it.


    Monday, April 14, 2014 8:52 PM