From 7e444ed0caec1deb028e3bdc1203d80caf8ac634 Mon Sep 17 00:00:00 2001 From: Govindass Date: Mon, 1 Feb 2021 14:11:01 +0200 Subject: [PATCH] Fix memory leak introduced by last commit --- src/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java b/src/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java index 2fe6a16..d003635 100644 --- a/src/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java +++ b/src/java/com/btk5h/skriptdb/skript/EffExecuteStatement.java @@ -119,8 +119,10 @@ public class EffExecuteStatement extends Effect { ((Map) res).forEach((name, value) -> setVariable(e, name, value)); } TriggerItem.walk(getNext(), e); - //let's try with this commented, as it may be not needed? let's test! - //Variables.removeLocals(e); + //the line below is required to prevent memory leaks + //no functionality difference notice with it being removed from my test, but the memory gets filled with leaks + //so it must be kept + Variables.removeLocals(e); } }); });