From 5e10ed677c804546423cc1d56462dc333b545466 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 14 Nov 2021 02:29:31 +0700 Subject: [PATCH] Fix iterators not being deallocated --- sources/Text/JSON/JSONAPI.uc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/Text/JSON/JSONAPI.uc b/sources/Text/JSON/JSONAPI.uc index d1e7898..5b7b39e 100644 --- a/sources/Text/JSON/JSONAPI.uc +++ b/sources/Text/JSON/JSONAPI.uc @@ -1001,6 +1001,7 @@ public final function MutableText PrintObject(AssociativeArray toPrint) } printedKeyValuePair = true; } + iter.FreeSelf(); result.Append(T(default.TCLOSE_BRACE)); return result; } @@ -1236,6 +1237,7 @@ private final function MutableText PrettyPrintObjectWithIndent( if (printedKeyValuePair) { result.AppendLineBreak().Append(accumulatedIndent); } + iter.FreeSelf(); result.Append(T(default.TCLOSE_BRACE), jObjectBraces); extendedIndent.FreeSelf(); return result;