Run garbage collector when game is reset or started

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 3 years ago committed by GitHub
parent effdf8b79f
commit 27d5e9ec64
  1. BIN
      RabiClone_0.0a.zip
  2. BIN
      bin/RabiClone.jar
  3. 7
      src/sig/RabiClone.java

Binary file not shown.

Binary file not shown.

@ -155,9 +155,11 @@ public class RabiClone{
player=null; player=null;
level_renderer=null; level_renderer=null;
control_settings_menu=null; control_settings_menu=null;
System.gc();
} }
private static void StartGame() { private static void StartGame() {
System.gc();
OBJ.add(player = new Player(p)); OBJ.add(player = new Player(p));
OBJ.add(new Erinoah(p)); OBJ.add(new Erinoah(p));
} }
@ -181,11 +183,6 @@ public class RabiClone{
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
} else {
if (System.currentTimeMillis()-lastReportedTime>1000) {
System.err.println("WARNING! Update loop is underperforming!");
lastReportedTime=System.currentTimeMillis();
}
} }
lastUpdate=newTime; lastUpdate=newTime;
} }

Loading…
Cancel
Save