Sign in to follow this  

[.net] Program not stopping - reference not releasing?

This topic is 4870 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

I've been working on the same game for a while, and it has been coming along pretty well. Recently, however, the program just does not shut down after I try to exit the program (or it might after 2-10 minutes or so). This happens in debug configuration - it seems to exit fine in release configuration. It gets past the form's Dispose method, so it isn't any sort of accidental infinite loop in my code or anything. It is probably a reference to something that is not being released, but I can't figure out what I changed or added that causes the behavior. Is there some decent way to track references or otherwise find out what is going on here?

Share this post


Link to post
Share on other sites
Are you using Managed DirectX? If so, turn of Device.IsUsingEventHandlers when not using events... otherwise your game will often have a huge unwinding process when you go to Dispose() the device.

There are numerous other ways to run into a situation like this as well. Make sure that if you create any objects every game window loop that you dispose them as quickly as possible.

I know that T. Miller often gets asked questions about this one, and he's written about it in his blog somewhere I believe...

http://blogs.msdn.com/tmiller/

Share this post


Link to post
Share on other sites

This topic is 4870 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this