On Thursday, 27 May 2021 at 16:17:12 UTC, Alain De Vos wrote:
I think of a dynamic array as a value-type consisting of a pointer to the actual data and a length, which gets copied.The data pointing to will continue to live.The pointer and length might disappear from the stack or get copied.I think there is no problem.
Seems logical, I just do not know exactly what a delegate internally does with captured variables from the function body. But you are right it must be something like that.