Skip to content

Commit

Permalink
Force collection on startup and reset.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdenCullen committed May 20, 2014
1 parent ce30d70 commit 2535556
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/core/dgame.d
Expand Up @@ -3,6 +3,7 @@
*/
module core.dgame;
import core, components, graphics, utility, utility.awesomium;
import core.memory;

/**
* The states the game can be in.
Expand Down Expand Up @@ -87,13 +88,16 @@ public:
//TaskManager.initialize();
start();

GC.collect();

// Loop until there is a quit message from the window or the user.
while( currentState != EngineState.Quit )
{
if( currentState == EngineState.Reset )
{
stop();
start();
GC.collect();
}
else if( currentState == EngineState.Refresh )
{
Expand Down

0 comments on commit 2535556

Please sign in to comment.