Can `MaybeUninit` be used to implement arena/object pool allocators?

I'm trying to understand how to implement an idiomatic arena/object pool allocator using the new MaybeUninit type.

My best guess at this time is that MaybeUninit can be used with types that I define, by writing initializers that take an out parameter. But, it also seems to me that there is not yet support for re-using the memory behind Box or Arc types (to choose some relevant and common examples).

Is anyone trying to do this? Am I barking up the wrong tree?


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.