...when copy-constructing fbow::Vocabulary (disregarded Rule of Three)
My application crashed in a method where I returned a generated vocabulary from a method. Apparently the default copy ctor simply copies the char pointer which got deleted twice (once in the dtor of the local vocabulary object, a second time by the returned copy). I replaced the raw pointer with a unique_ptr with a custom deleter and made the object move-only so it can be returned from methods.
reenabled distance_hamming_32bytes.
Any reason why the latter was commented out? Gives a 4x speedup for me on Win10, i7
...when copy-constructing fbow::Vocabulary (disregarded Rule of Three)
My application crashed in a method where I returned a generated vocabulary from a method. Apparently the default copy ctor simply copies the char pointer which got deleted twice (once in the dtor of the local vocabulary object, a second time by the returned copy). I replaced the raw pointer with a unique_ptr with a custom deleter and made the object move-only so it can be returned from methods.
reenabled distance_hamming_32bytes.
Any reason why the latter was commented out? Gives a 4x speedup for me on Win10, i7