Memory leak alleviated FUCK YEAH?

This commit is contained in:
minjaesong
2018-12-08 04:26:01 +09:00
parent 7570c9674b
commit dffb3f95a2
3 changed files with 43 additions and 18 deletions

View File

@@ -490,7 +490,21 @@ object IngameRenderer {
blendNormal(batch)
}
private var init = false
fun resize(width: Int, height: Int) {
if (!init) {
init = true
}
else {
fboRGB.dispose()
fboRGB_lightMixed.dispose()
fboA.dispose()
fboA_lightMixed.dispose()
lightmapFboA.dispose()
lightmapFboB.dispose()
}
fboRGB = FrameBuffer(Pixmap.Format.RGBA8888, width, height, false)
fboRGB_lightMixed = FrameBuffer(Pixmap.Format.RGBA8888, width, height, false)
fboA = FrameBuffer(Pixmap.Format.RGBA8888, width, height, false)