On Friday, 8 October 2021 at 06:59:32 UTC, Nicholas Wilson wrote:
On Friday, 8 October 2021 at 05:31:21 UTC, codic wrote:
[...]

[...]

No, I meant what I said. The array literal will cause a GC allocation, unless it is assigned to a static array of the same length or is inferred to be a static array. The latter happens when you pass it to `staticArray` because staticArray takes a static array as a parameter and the literal is inferred to be static array instead of a dynamic array, which is the default.

[...]

Clears that up, thank you very much for your reply!

Reply via email to