Jump to content
  • Advertisement
Sign in to follow this  
Kruz

[.net] Memory leak

This topic is 4058 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My app keeps building memory and I don't know why. Is there a way to check which objects are in the memory of .Net app? My app contains custom objects, threads, and database connections; as far as I can see I've removed references by setting the objects to null when they complete the job, but still after an hour the apps memory grows more than 100MB.

Share this post


Link to post
Share on other sites
Advertisement
Make sure you call Dispose() on anything that you created that implements IDisposable, so that unmanaged resources can be freed.

You might also want to read this; it might help you get moving in the right direction.

Share this post


Link to post
Share on other sites
Did you run the CLR profiler on it?
Clr Profiler for 1.1
Clr Profiler for 2.0

It sounds like you have some references somewhere you're forgetting to null, maybe a list of objects or event handlers or delegates. The profiler should tell you what types of objects are allocated and you may be able to guess which objects are not being collected.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!