2 ms·
This is not really true, as far as I know. You can control the memory layout of structs, they can be allocated on the stack, because they're value types, but no
by vrighter 3y ago
This is not really true, as far as I know. You can control the memory layout of structs, they can be allocated on the stack, because they're value types, but not necessarily.
If you, for example, create an array of said struct type, the array's memory will be on the heap. And the structs will be stored in it. You can't assume a struct will be on the stack.
- vrighter 3y agonevermind... I was just out of date. C3 now has ref structs