Skip to content

Commit

Permalink
Release memory properly for an array type (opensearch-project#1820) (o…
Browse files Browse the repository at this point in the history
…pensearch-project#1821)

Signed-off-by: Heemin Kim <[email protected]>
(cherry picked from commit 31a4d3e)

Co-authored-by: Heemin Kim <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and heemin32 authored Jul 12, 2024
1 parent 8b63d1d commit af8f04d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
### Maintenance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ index 270de8dc..3199634f 100644
+ /// series of results for query i is done
+ void end() {
+ heap_reorder<C>(k, heap_dis, heap_ids);
+ delete heap_group_ids;
+ delete[] heap_group_ids;
+ }
+ };
+
Expand Down Expand Up @@ -528,8 +528,8 @@ index 270de8dc..3199634f 100644
+ for (size_t i = i0; i < i1; i++) {
+ heap_reorder<C>(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;
+ }
+};
+
Expand Down

0 comments on commit af8f04d

Please sign in to comment.