From 265d40c4d5e4239ce4d920b43372e33d6bf62a5d Mon Sep 17 00:00:00 2001 From: stephankempkes <77802870+stephankempkes@users.noreply.github.com> Date: Tue, 9 Feb 2021 07:02:53 +0100 Subject: [PATCH] fix(iterator): null conditional dispose (#401) Co-authored-by: Stephan Kempkes --- cs/src/core/Index/FASTER/FASTERIterator.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cs/src/core/Index/FASTER/FASTERIterator.cs b/cs/src/core/Index/FASTER/FASTERIterator.cs index 7adce5501..850cfd96e 100644 --- a/cs/src/core/Index/FASTER/FASTERIterator.cs +++ b/cs/src/core/Index/FASTER/FASTERIterator.cs @@ -100,11 +100,11 @@ public FasterKVIterator(FasterKV fht, Functions functions, Compactio public void Dispose() { - iter1.Dispose(); - iter2.Dispose(); - fhtSession.Dispose(); - tempKvSession.Dispose(); - tempKv.Dispose(); + iter1?.Dispose(); + iter2?.Dispose(); + fhtSession?.Dispose(); + tempKvSession?.Dispose(); + tempKv?.Dispose(); } public ref Key GetKey()