mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 06:24:06 +09:00
no memory leak on ImageBuffer rendering
Turns out, <ImageBuffer>.image creates new Image instance which will NEVER be reclaimed (which causes OutOfMemoryError) unless manually destroy()ed. Former-commit-id: 34840cf63e52e5635ec8acd5fb1bb78923c61063 Former-commit-id: aca4388320fae022a4744f75c1b0f66b544bdafb
This commit is contained in:
@@ -44,6 +44,10 @@ constructor(gamename: String) : StateBasedGame(gamename) {
|
||||
// just in case
|
||||
println("[Terrarum] os.arch = $systemArch")
|
||||
|
||||
if (is32Bit) {
|
||||
println("Java is running in 32 Bit")
|
||||
}
|
||||
|
||||
gameConfig = GameConfig()
|
||||
|
||||
joypadLabelStart = when (getConfigString("joypadlabelstyle")) {
|
||||
@@ -131,7 +135,7 @@ constructor(gamename: String) : StateBasedGame(gamename) {
|
||||
gc.graphics.clear() // clean up any 'dust' in the buffer
|
||||
|
||||
//addState(StateVTTest())
|
||||
addState(StateGraphicComputerTest())
|
||||
//addState(StateGraphicComputerTest())
|
||||
//addState(StateTestingLightning())
|
||||
//addState(StateSplash())
|
||||
//addState(StateMonitorCheck())
|
||||
|
||||
Reference in New Issue
Block a user