Skip to content
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

Data members of HierarchicalNSW should not depend on SpaceInterface's lifetime #161

Open
renewboy opened this issue Nov 6, 2019 · 4 comments

Comments

@renewboy
Copy link

renewboy commented Nov 6, 2019

fstdistfunc_ and dist_func_param_ are pointers that point to corresponding data members of SpaceInterface. It requires the lifetime of SpaceInterface should longer than HierarchicalNSW, which is unnoticeable and is easily misused. I think the code would be more robust if making a deep copy of these data members.

@yurymalkov
Copy link
Member

@zouyxdut
Thank you for the suggestion!
Would you be able to implement it?

@renewboy
Copy link
Author

renewboy commented Nov 7, 2019

@yurymalkov Yeah I would try it.

@yurymalkov
Copy link
Member

@zouyxdut Great! Looking forward to it.

@renewboy
Copy link
Author

@yurymalkov see #168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants