Reference type variables themselves are stored on the stack, is that correct?
While we often say value types live on the stack, ref types live on the heap.
That's not completely true right?
That's not completely true right?
- eg. Building house = new Building();
- When we assign int to a List<int>, those int values actually live on the heap. ( Of course if we create int variables directly, they are stored on the stack)