Just adding the async keyword to a function adds two heap allocations to that function. One is the state machine and one is the task method builder. Example: https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBY4AcoQGYEsA2MAJgDREgDUAPgAIBMAjALABQNAzAAT2cDCnAb1acR3LjQAc3FJwCyACgCUg4aIC+rNUA= Not mentioning the Task/Task< T > allocations. None of these are highlighted.
Just adding the async keyword to a function adds two heap allocations to that function. One is the state machine and one is the task method builder. Example: https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBY4AcoQGYEsA2MAJgDREgDUAPgAIBMAjALABQNAzAAT2cDCnAb1acR3LjQAc3FJwCyACgCUg4aIC+rNUA=
Not mentioning the Task/Task< T > allocations.
None of these are highlighted.