mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 03:23:17 -04:00
fix memory leak due to Pixmap don't be released. (#7964)
* fix memory leak due to Pixmap don't be released. * dispose pixmap early.
This commit is contained in:
parent
ef1c81bef7
commit
8ab716a429
@ -36,7 +36,10 @@ class LoadingScreen(
|
||||
for (popup in previousScreen.popups) popup.isVisible = false
|
||||
previousScreen.render(Gdx.graphics.getDeltaTime())
|
||||
}
|
||||
val screenshot = Texture(Pixmap.createFromFrameBuffer(0, 0, Gdx.graphics.backBufferWidth, Gdx.graphics.backBufferHeight))
|
||||
val pixmap = Pixmap.createFromFrameBuffer(0, 0, Gdx.graphics.backBufferWidth, Gdx.graphics.backBufferHeight)
|
||||
val screenshot = Texture(pixmap)
|
||||
pixmap.dispose()
|
||||
|
||||
if (previousScreen != null) {
|
||||
for (popup in previousScreen.popups) popup.isVisible = true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user