sophiajt / june

MIT License
813 stars 31 forks source link

Early drop of owned pointers (and their contents) #28

Open sophiajt opened 6 months ago

sophiajt commented 6 months ago

Owned pointers are fully-encapsulated, and do no leak any shared pointers with code outside of themselves. This means that once the owner of an owned pointer drops it, all of its memory can be immediately reclaimed safely, before the end of the allocation group has finished.

We could take advantage of this and immediately free the memory for reuse.