diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cb1665f6..09f4c0d8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Enhancements ### Bug Fixes * Fixing the arithmetic to find the number of vectors to stream from java to jni layer.[#1804](https://github.com/opensearch-project/k-NN/pull/1804) +* Release memory properly for an array type [#1820](https://github.com/opensearch-project/k-NN/pull/1820) ### Infrastructure ### Documentation * Update dev guide to fix clang linking issue on arm [#1746](https://github.com/opensearch-project/k-NN/pull/1746) diff --git a/jni/patches/faiss/0001-Custom-patch-to-support-multi-vector.patch b/jni/patches/faiss/0001-Custom-patch-to-support-multi-vector.patch index de5806ef0..7afdabc1f 100644 --- a/jni/patches/faiss/0001-Custom-patch-to-support-multi-vector.patch +++ b/jni/patches/faiss/0001-Custom-patch-to-support-multi-vector.patch @@ -450,7 +450,7 @@ index 713fe8e4..d307fd70 100644 + /// series of results for query i is done + void end() { + heap_reorder(k, heap_dis, heap_ids); -+ delete heap_group_ids; ++ delete[] heap_group_ids; + } + }; + @@ -527,8 +527,8 @@ index 713fe8e4..d307fd70 100644 + for (size_t i = i0; i < i1; i++) { + heap_reorder(k, heap_dis_tab + i * k, heap_ids_tab + i * k); + } -+ delete group_id_to_index_in_heap_tab; -+ delete heap_group_ids_tab; ++ delete[] group_id_to_index_in_heap_tab; ++ delete[] heap_group_ids_tab; + } +}; +