Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
227410321
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
227410321
Commits
e3776ff4
Unverified
Commit
e3776ff4
authored
2 years ago
by
presburger
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix dataset memory leak when use python api (#351)
Signed-off-by:
Yusheng.Ma
<
Yusheng.Ma@zilliz.com
>
parent
57820199
No related branches found
Branches containing commit
Tags
v1.1.17
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/knowhere/knowhere.i
+5
-0
5 additions, 0 deletions
python/knowhere/knowhere.i
with
5 additions
and
0 deletions
python/knowhere/knowhere.i
+
5
−
0
View file @
e3776ff4
...
...
@@ -138,6 +138,8 @@ DumpResultDataSet(const knowhere::DatasetPtr& result, float* dis, int nq_1, int
*(dis + i * k_1 + j) = *((float*)(dist_) + i * k_1 + j);
}
}
delete[] ids_;
delete[] dist_;
}
void
...
...
@@ -146,6 +148,7 @@ DumpRangeResultIds(const knowhere::DatasetPtr& result, int* ids, int len) {
for (int i = 0; i < len; ++i) {
*(ids + i) = *((int64_t*)(ids_) + i);
}
delete[] ids_;
}
void
...
...
@@ -154,6 +157,7 @@ DumpRangeResultLimits(const knowhere::DatasetPtr& result, int* lims, int len) {
for (int i = 0; i < len; ++i) {
*(lims + i) = *((int64_t*)(lims_) + i);
}
delete[] lims_;
}
void
...
...
@@ -162,6 +166,7 @@ DumpRangeResultDis(const knowhere::DatasetPtr& result, float* dis, int len) {
for (int i = 0; i < len; ++i) {
*(dis + i) = *((float*)(dist_) + i);
}
delete[] dist_;
}
knowhere::Config
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment