-
Nov 30th, 2007, 03:01 PM
#1
Thread Starter
Frenzied Member
[2005] Ending an application
I remember the issue in VB6 where when you performed Unload or some other function that would close the application, sometimes, if done incorrectly, it would only close the form and the application would still be running in memory. You would have to open up the task manager and end the process.
Normally, to close an application, I use Application.Exit. However, with my game, this doesn't seem to work. Sure, it exits the game, but it is still running in memory. This only happened around halfway through my game's progress and I have forget what has caused it.
Is there a more efficient way to close an application that does not leave it running in memory?
-
Nov 30th, 2007, 03:02 PM
#2
Re: [2005] Ending an application
Do you have more than one thread running? It could be that any of the worker threads are still alive.
-
Nov 30th, 2007, 03:08 PM
#3
Thread Starter
Frenzied Member
Re: [2005] Ending an application
The only thing that I could imagine the problem to be would be my server application I wrote specifically for the game, but it is an entirely different project within the solution and I am not running it while the game is running and I don't even connect to online so I know that couldn't be the problem.
The problem may be the render loop.. maybe. I have one thread inside my game.
-
Nov 30th, 2007, 03:14 PM
#4
Re: [2005] Ending an application
You have one thread in your game, not counting the main thread that is?
Have you set its IsBackground property to true?
-
Nov 30th, 2007, 03:16 PM
#5
Thread Starter
Frenzied Member
Re: [2005] Ending an application
The other thread is not currently being used. That one is for the server project. It's an entirely different project with an entirely different executable. I'm sure that it has nothing to do with this problem.
It's probably the render loop.
-
Dec 1st, 2007, 12:09 AM
#6
Re: [2005] Ending an application
Is the render loop running on a separate thread?
-
Dec 5th, 2007, 06:12 AM
#7
Thread Starter
Frenzied Member
Re: [2005] Ending an application
Nope.
I've noticed it has something to do with entering game states. If I go from main menu to options menu and then back to main menu and exit, it works fine. However, if I go from main menu to in game state and then back out again and then exit, it stays in memory. =/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|