by noctune · 3y ago · 0 comments
Tying your memory consumption heavily to the max stack depth also seems like it would be difficult to reason about IMO.
- Arcing everything
- using a fixed-sized ancillary array and passing indices
- creating threads that correspond to the lifetimes you care about
- fighting your way through adding explicit lifetime allocations and
- delaying reclamation of _everything_ above it on the stack
...
and while workable, none of those things are particularly nice