by alexeiz · 1mo ago · 0 comments
Heap allocation is not required, just the default.
You can do static allocation if you wish, though it is a little more complicated than typical static allocation due to the relative unpredictability.
So anyone that has experience in such model, including the awaitable magic methods, can grasp it.
While not cost free, the optimisers are expected to elide the cost most of the time.