From 7b0a178f7036113328075072948b7466f6d5ec1c Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 6 Jan 2019 13:48:18 +0200 Subject: [PATCH] ConfigNode#remove now recursively removes the children This is to avoid memory leaks from removals --- .../djrapitops/plan/system/settings/config/ConfigNode.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/ConfigNode.java b/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/ConfigNode.java index 97e0752cb..f55d7b879 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/ConfigNode.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/system/settings/config/ConfigNode.java @@ -125,6 +125,11 @@ public class ConfigNode { parent.childNodes.remove(key); parent.nodeOrder.remove(key); updateParent(null); + + for (ConfigNode child : childNodes.values()) { + child.remove(); + } + } /**