@[email protected] to [email protected] • 4 months agoAre dictionaries on the stack or on the heap?message-square2fedilinkarrow-up17arrow-down10
arrow-up17arrow-down1message-squareAre dictionaries on the stack or on the heap?@[email protected] to [email protected] • 4 months agomessage-square2fedilink
minus-square@[email protected]linkfedilink2•4 months agoI can’t look at the source right now, but it’s likely heap. Swift stdlib collections typically use a buffer that is a reference type. The whole ‘copy on write’ thing requires reference types somewhere in the guts (if I remember correctly).
I can’t look at the source right now, but it’s likely heap. Swift stdlib collections typically use a buffer that is a reference type. The whole ‘copy on write’ thing requires reference types somewhere in the guts (if I remember correctly).