Generally speaking: A reference to Null takes only the space of the reference itself on the stack. Which should be 8 byte on a 64 bit system.
In your particular case: Note the difference between boxed and unboxed values! A boxed integer is a reference to an instance of the Integer class. The instance was not created (Nothing), so it takes no space. The reference takes 8 bytes.
If you were using an unboxed value (int), it would take the space of an int (struct), which is exactly 4 bytes. Note that there is no reference involved here.
It would be an easier example to use a 'regular' class instead of the special case with Integer. For instance, consider
Object o = new Object()
This takes 8 bytes on the stack, even though o
itself is empty.