-
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
use safe allocator in hnsw implementation #31
Conversation
Signed-off-by: wxy407827 <wxy407827@antgroup.com>
@@ -77,7 +77,7 @@ HNSW::HNSW(std::shared_ptr<hnswlib::SpaceInterface> space_interface, | |||
alg_hnsw = | |||
std::make_shared<hnswlib::HierarchicalNSW>(space.get(), | |||
DEFAULT_MAX_ELEMENT, | |||
allocator, | |||
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.
Missing changes?
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.
yes, missing in last commit
@@ -77,6 +77,7 @@ class HNSW : public Index { | |||
Allocator* allocator = nullptr); | |||
|
|||
virtual ~HNSW() { | |||
alg_hnsw = nullptr; |
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.
alg_hnsw -> alg_hnsw_
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.
alg_hnsw -> alg_hnsw_
will change in next PR
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
@@ -77,6 +77,7 @@ class HNSW : public Index { | |||
Allocator* allocator = nullptr); | |||
|
|||
virtual ~HNSW() { | |||
alg_hnsw = nullptr; |
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.
alg_hnsw -> alg_hnsw_
will change in next PR
Signed-off-by: wxy407827 <wxy407827@antgroup.com>
No description provided.