Multiple ChoiceHard 45s
Coroutine Frame Lifetime and Destruction
In C++20, when is the coroutine frame for a coroutine created via `co_await` on a suspended caller typically destroyed?
Options
- 1When the coroutine reaches its final suspend or is otherwise destroyed, via the promise's destroy path
- 2Immediately when the coroutine reaches its first suspension point after being resumed
- 3At program exit, because coroutine frames are given static storage duration by the compiler
- 4When the caller's scope ends, regardless of how far the coroutine has actually progressed
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.