Results 1 to 7 of 7

Thread: [2005] Ending an application

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    [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?

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    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.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    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.

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    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?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    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.

  6. #6
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,289

    Re: [2005] Ending an application

    Is the render loop running on a separate thread?

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    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
  •  



Click Here to Expand Forum to Full Width