mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-31 15:19:29 +07: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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user