Open asilvas opened 11 months ago
Thanks for your new PR, Noticed that
dispose
method was added. Could you please clarify the indentation? I see that it's being checked in every method, and I'm trying to understand its necessity.Also, I noticed that the underlying implementation of the
dispose
method is actually callingindex_.release();
. If we keep this method, would it be more appropriate to rename it torelease
to reflect its actual functionality?
Dispose is used to free all memory associated with an index. If you're OK with a segfault if calling a method on a released index, then I'm fine reverting the checks from every method.
dispose
is consistent naming across ML frameworks for freeing memory. But up to you if you want to change it.
@asilvas In the world of javascript, memory is rarely dealt with, the reset
and dispose
have similar uses. I want to remove the dispose
method first, and merge this pr. Is this okay?
@asilvas In the world of javascript, memory is rarely dealt with, the
reset
anddispose
have similar uses. I want to remove thedispose
method first, and merge this pr. Is this okay?
I'd prefer to keep both as there is no other way to free all memory, and have need for recreating a lot of indexes.
Thanks for your new PR, Noticed that
dispose
method was added. Could you please clarify the indentation? I see that it's being checked in every method, and I'm trying to understand its necessity.Also, I noticed that the underlying implementation of the
dispose
method is actually callingindex_.release();
. If we keep this method, would it be more appropriate to rename it torelease
to reflect its actual functionality?