FastFilter / fastfilter_cpp

Fast Approximate Membership Filters (C++)
Apache License 2.0
261 stars 24 forks source link

free vs new #16

Closed rurban closed 3 years ago

rurban commented 3 years ago

https://github.com/FastFilter/fastfilter_cpp/blob/677b2907d094489774c5f88df8b057b9a0a3d2d2/src/bloom/bloom.h#L299

rather use delete[] here. g++-11 warns with../src/bloom/bloom.h:299:7: warning: 'void free(void*)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete] 299 | free(data);

lemire commented 3 years ago

You are correct, I believe.