From 2ae8b74d3534db1d6bca7eaaeaefb5ed980bd767 Mon Sep 17 00:00:00 2001 From: Tyler Gregg Date: Wed, 10 Jan 2024 13:11:32 -0800 Subject: [PATCH] Sets binary reader buffers to null on close(). --- src/main/java/com/amazon/ion/impl/IonCursorBinary.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java index 4e94b2f132..43e64748e3 100644 --- a/src/main/java/com/amazon/ion/impl/IonCursorBinary.java +++ b/src/main/java/com/amazon/ion/impl/IonCursorBinary.java @@ -1898,6 +1898,9 @@ public void close() { throwAsIonException(e); } } + buffer = null; + containerStack = null; + byteBuffer = null; } /* ---- End: version-agnostic parsing, utility, and public API methods ---- */