nmslib / hnswlib

Header-only C++/python library for fast approximate nearest neighbors
https://github.com/nmslib/hnswlib
Apache License 2.0
4.12k stars 609 forks source link

Use unique_ptr to manage visited_list_pool_ #474

Closed ttsugriy closed 12 months ago

ttsugriy commented 1 year ago

Using raw pointers is error-prone. For example, previous implementation would leak pool in case it's created and loadIndex is invoked.

yurymalkov commented 1 year ago

Hi @ttsugriy, it looks like the CI is not passing. Can you please look into that?

ttsugriy commented 1 year ago

Sure thing, @yurymalkov, it's due to a difference between macOS and Linux headers. Should be fixed now.

yurymalkov commented 12 months ago

Thanks!