From 18d7847077270de8e5f9a0788f887fffe4cdaba7 Mon Sep 17 00:00:00 2001 From: Ambrose Bonnaire-Sergeant Date: Fri, 23 Aug 2024 14:45:28 -0500 Subject: [PATCH] CLJ-2297: Fix BitmapNode#without(Object) memory leak --- src/com/ambrosebs/map.clj | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/com/ambrosebs/map.clj b/src/com/ambrosebs/map.clj index 8433219..755d235 100644 --- a/src/com/ambrosebs/map.clj +++ b/src/com/ambrosebs/map.clj @@ -385,15 +385,16 @@ idx)))) (= key key-or-null) - ;; TODO: collapse - rhickey - (bitmap-indexed-node-ctor + (if (identical? bitmap bit) nil - (bit-xor - bitmap - bit) - (remove-pair - array - idx)) + (bitmap-indexed-node-ctor + nil + (bit-xor + bitmap + bit) + (remove-pair + array + idx))) :else this))))) (find-node