Re:Handles Are the Better Pointers
by 10000truths on Wednesday June 21, 2023 @03:58PM
(#36423539)
Not really. Compaction is a feature of many garbage collectors, but the allocator I described doesn't impose any particular way of deciding how and when to deallocate the objects. You could do so explicitly with a MyAllocator::deallocate() method, or use runtime reference counting, or (if you're willing to constrain handle lifetimes to the allocator lifetime) you could delete the allocator entry when the handle goes out of scope.
[ Parent
| on HN ]
There are no comments on this comment yet.