Leo Qiao

Leo Qiao

  • 1.6k
  • 99
  • 595

Memory allocation for reference type variable

Nov 26 2024 5:00 AM

1.Declaring a non nullable reference type variable:
Someclass v;
will it allocate a memory to store the reference value(it is 0), which refers to null?

Declaring a nullable reference type variable:
Someclass? v;
2.will it do the same thing as above or no any memory allocated at all?


Answers (6)