Browse Source

Fix iterators not being deallocated

pull/8/head
Anton Tarasenko 3 years ago
parent
commit
5e10ed677c
  1. 2
      sources/Text/JSON/JSONAPI.uc

2
sources/Text/JSON/JSONAPI.uc

@ -1001,6 +1001,7 @@ public final function MutableText PrintObject(AssociativeArray toPrint)
} }
printedKeyValuePair = true; printedKeyValuePair = true;
} }
iter.FreeSelf();
result.Append(T(default.TCLOSE_BRACE)); result.Append(T(default.TCLOSE_BRACE));
return result; return result;
} }
@ -1236,6 +1237,7 @@ private final function MutableText PrettyPrintObjectWithIndent(
if (printedKeyValuePair) { if (printedKeyValuePair) {
result.AppendLineBreak().Append(accumulatedIndent); result.AppendLineBreak().Append(accumulatedIndent);
} }
iter.FreeSelf();
result.Append(T(default.TCLOSE_BRACE), jObjectBraces); result.Append(T(default.TCLOSE_BRACE), jObjectBraces);
extendedIndent.FreeSelf(); extendedIndent.FreeSelf();
return result; return result;

Loading…
Cancel
Save