fix memory leak from my ididcy; relationship w #19 needs investigation

This commit is contained in:
minjaesong
2019-01-31 05:02:44 +09:00
parent d93c6de851
commit 90a7fcd4d0

View File

@@ -38,6 +38,8 @@ object PostProcessor {
// init
if (!init) {
init = true
batch = SpriteBatch()
camera = OrthographicCamera(AppLoader.screenW.toFloat(), AppLoader.screenH.toFloat())
camera.setToOrtho(true)
@@ -115,6 +117,12 @@ object PostProcessor {
}
}
catch (doNothing: NullPointerException) { }
finally {
// one-time call, caused by catching NPE before batch ends
if (batch.isDrawing) {
batch.end()
}
}
}
}
}