Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4103916
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:01:17+00:00 2026-05-20T21:01:17+00:00

I have a C# XNA on WP7 project running and I’m finding that it’s

  • 0

I have a C# XNA on WP7 project running and I’m finding that it’s eating up memory between screen changes and not returning it, eventually leading to an outofmemoryexception.

I’ve looked and looked but I can’t for the life of me find where this memory is going.

is there any way I can find out where the memory is being used and why it’s not being given back to the device?

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T21:01:17+00:00Added an answer on May 20, 2026 at 9:01 pm

    Use Microsoft’s CLR Profiler for .NET Framework 4 (free) on the Windows version of your project.

    Using this you can get a timeline of your project’s memory allocations. Or you can inspect the heap itself. It gives you a list of everything allocated by type. You will probably see the object you are allocating excessively, from there you can bring up an allocation graph for that type or that range of time. This will show what functions allocated those objects.

    Here’s a random blog entry that has some screenshots and discussion of the CLR Profiler in action. (Not quite what you will be doing with it, but a useful intro if you’ve never used the CLR Profiler before.)

    However: Because you are using XNA, and you generally have to try really hard to get C# to run out of managed memory, you are probably running out of unmanaged memory. Is there somewhere you are not calling Dispose() before you stop using a graphics or sound object you created? I have discussed the details of this a couple of times.

    So just be aware that, if you have lots of very tiny objects showing up in the CLR Profiler – they may in fact be using up vast amounts of unmanaged memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that the .NET memory model (on the .NET Framework; not compact/micro/silverlight/mono/xna/what-have-you) guaranteed
I have a WP7 XNA game that needs to save the state whenever the
I have an XNA 4.0 project that I would like to be compiled with
I have an XNA project on WP7. I would like to get access to
i have a simple xna game that i want to port that to silverlight,
I have some projects from XNA 1.0 that I wanted to debug but when
I have a standard 800x600 window in my XNA project. My goal is to
I have a WinForms application that uses XNA to animate 3D models in a
We have an existing PC game that uses C# and the XNA Framework. We
hi i have a question about the silverlight/xna template for wp7 programming. i start

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.