3 ms·
>> "When it starts to matter, I'll spend the time looking into it. Until then, I try to know just enough to clue me into whether it might matter." Exactly. St
by msiyer 8y ago
>> "When it starts to matter, I'll spend the time looking into it. Until then, I try to know just enough to clue me into whether it might matter."
Exactly.
Stack and heap are not important in the C# example I gave. What matters is whether the data structure is a "reference type" or a "value type". This impacts the way we pass arguments to functions, scope of a variable and related side-effects etc. However, where these types reside has very little meaning since the memory allocation and cleanup etc. are not in developers control at all (unlike C, C++).