I just wondered, if I have a variable and I assign Nothing
(or Null
) to it, how much memory does the variable occupy?
For example
Dim i as Integer = Nothing
Does the variable use no memory? Or the size of the integer, 4 byte? Basically I think that it means the value is not assigned and therefore there is no value anywhere in memory so it should take no memory. However there is the information stored that the variable is nothing, so this information must take memory, right? Is there a difference between .NET and native languages? Or between value and reference types?