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?

  1. eg. Building house = new Building();
In this case, house is simply a pointer to the building object. And it's stored on the stack. While actual building object is stored on the heap.

  1. 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)
Is this the correct interpretation?
Was this page helpful?