From 8df6e972cbce3561186a733d96f025ecf7b31b1c Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 16 Sep 2021 20:28:07 -0500 Subject: [PATCH] Fix a out of memory error when changing worlds --- src/main/java/com/seibel/lod/proxy/ClientProxy.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/seibel/lod/proxy/ClientProxy.java b/src/main/java/com/seibel/lod/proxy/ClientProxy.java index fa48acaeb..68380afc8 100644 --- a/src/main/java/com/seibel/lod/proxy/ClientProxy.java +++ b/src/main/java/com/seibel/lod/proxy/ClientProxy.java @@ -254,6 +254,12 @@ public class ClientProxy // breaking when changing worlds. renderer.destroyBuffers(); recalculateWidths = true; + + + // make sure the nulled objects are freed. + // (this prevents a out of memory error when + // changing worlds) + System.gc(); } }