You are not wrong, when it is a struct, it is being heap allocated.
Looks like the optimization for classes, hasn't been applied to structs. https://issues.dlang.org/show_bug.cgi?id=24806
Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn Sat, 12 Oct 2024 06:16:35 -0700
You are not wrong, when it is a struct, it is being heap allocated.
Looks like the optimization for classes, hasn't been applied to structs. https://issues.dlang.org/show_bug.cgi?id=24806