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:
Song Minjae
2017-02-25 02:39:02 +09:00
parent d7b49b0f9d
commit 3b7e88b0af
6 changed files with 61 additions and 24 deletions

View File

@@ -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())