From 0bf5cae401e6863ff9e5fac7eff28768c483e0c0 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 17 Apr 2023 08:49:19 +0300 Subject: [PATCH] Solved RAM crashes hopefully :) --- core/src/com/unciv/ui/components/Fonts.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/com/unciv/ui/components/Fonts.kt b/core/src/com/unciv/ui/components/Fonts.kt index 627782a88d..c6d44cc516 100644 --- a/core/src/com/unciv/ui/components/Fonts.kt +++ b/core/src/com/unciv/ui/components/Fonts.kt @@ -295,6 +295,9 @@ object Fonts { Gdx.gl.glReadPixels(0, 0, w, h, GL20.GL_RGBA, GL20.GL_UNSIGNED_BYTE, pixmap.pixels) frameBuffer.end() + spriteBatch.dispose() + frameBuffer.dispose() + // Pixmap is now *upside down* so we need to flip it around the y axis for (i in 0..w) for (j in 0..h/2) {