Skip to content

Commit 1a3c11b

Browse files
authored
Add speaker note that arrays go on the stack (#2826)
1 parent 4dbbcce commit 1a3c11b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tuples-and-arrays/arrays.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ fn main() {
6565
- Adding `#`, eg `{a:#?}`, invokes a "pretty printing" format, which can be
6666
easier to read.
6767

68+
- Arrays are not heap-allocated. They are regular values with a fixed size known
69+
at compile time, meaning they go on the stack. This can be different from what
70+
students expect if they come from a garbage collected language, where arrays
71+
may be heap allocated by default.
72+
6873
</details>

0 commit comments

Comments
 (0)