Lets just clean up the fact that I don’t use native code and if I did I would manually clean that up before I quit.
Now onto quiting a game in Java.
Using business apps, it isn’t a problem to save your file, database or whatever and just quit using System.exit(0);.
Games however are massive programs eating up hundreds of MB of memory and cleaning out system resources like a pirhana on the end of your pants.
My question is, should I use “System.exit(0)” to exit my game or should I let my game exit it’s main loop for a graceful exit?
What’s the difference between a graceful exit and forced exit in Java? Under C++ it could mean loose resources that don’t get cleaned but this shouldn’t be a problem in Java.
However, I would like confirmation on this just in case there is something special going on.