From 5958b5d0baacc7dfd6ced2a5d752e7703aef37dc Mon Sep 17 00:00:00 2001 From: rtm516 Date: Sun, 5 Jul 2020 21:07:49 +0100 Subject: [PATCH] Fix ram graph causing memory leak and add cleanup of options menu on reload --- .../platform/standalone/gui/GeyserStandaloneGUI.java | 1 + .../org/geysermc/platform/standalone/gui/GraphPanel.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GeyserStandaloneGUI.java b/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GeyserStandaloneGUI.java index cc40ae53..f4138354 100644 --- a/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GeyserStandaloneGUI.java +++ b/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GeyserStandaloneGUI.java @@ -254,6 +254,7 @@ public class GeyserStandaloneGUI { */ public void setupInterface(GeyserStandaloneLogger geyserStandaloneLogger, GeyserCommandManager geyserCommandManager) { commandsMenu.removeAll(); + optionsMenu.removeAll(); for (Map.Entry command : geyserCommandManager.getCommands().entrySet()) { // Remove the offhand command and any alias commands to prevent duplicates in the list diff --git a/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GraphPanel.java b/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GraphPanel.java index eb259cf7..0e336132 100644 --- a/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GraphPanel.java +++ b/bootstrap/standalone/src/main/java/org/geysermc/platform/standalone/gui/GraphPanel.java @@ -43,9 +43,9 @@ public final class GraphPanel extends JPanel { private final static int labelPadding = 25; private final static int pointWidth = 4; private final static int numberYDivisions = 10; - private final static Color lineColor = new Color(44, 102, 230, 180); - private final static Color pointColor = new Color(100, 100, 100, 180); - private final static Color gridColor = new Color(200, 200, 200, 200); + private final static Color lineColor = new Color(44, 102, 230, 255); + private final static Color pointColor = new Color(100, 100, 100, 255); + private final static Color gridColor = new Color(200, 200, 200, 255); private static final Stroke graphStroke = new BasicStroke(2f); private List values = new ArrayList<>(10);