-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle the bad alloc exception in vector search #21
Conversation
82be33e
to
84987d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -70,7 +72,7 @@ HNSW::HNSW(std::shared_ptr<hnswlib::SpaceInterface> space_interface, | |||
if (not allocator) { | |||
allocator = DefaultAllocator::Instance(); | |||
} | |||
allocator_ = allocator; | |||
allocator_ = new SafeAllocator(allocator); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SafeAllocator need free ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, release at deconstruct function
Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com>
84987d6
to
598dd60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com>
No description provided.