fitzgen / generational-arena

A safe arena allocator that allows deletion without suffering from the ABA problem by using generational indices.
https://docs.rs/generational-arena
Mozilla Public License 2.0
672 stars 53 forks source link

Fix Arena::retain #28

Closed Herschel closed 4 years ago

Herschel commented 4 years ago

retain was iterating over self.len and not self.capacity() causing it not visit entries when there are free slots in the middle of the Vec.