rust-cv / header-vec

Allows one to store a header struct and a vector all inline in the same memory on the heap and share weak versions for minimizing random lookups in data structures
MIT License
5 stars 2 forks source link

deallocate on drop #6

Closed makoConstruct closed 3 years ago

makoConstruct commented 3 years ago

It turns out that... it wasn't being deallocated in drop.

It only occurred to me to look at this because my computer was entering swap hell every time I ran a benchmark. This seems to have been most of the cause of those bad benchmark results. I can't explain how it produced those particular figures so reliably, but the numbers have now fallen to ordinary ranges.

vadixidav commented 3 years ago

Oh wow, I remembered to drop in place, but not to deallocate. Doh! Thanks so much for finding this!