Friday, February 16, 2018

Value Type and Reference Type

Value type defined in a function goes in stack while value type associated with a class object i.e declared as a member variable goes in heap.

Reference type variable declared as member goes in heap as well their reference, if reference type variable are declared in a function than those variable will goes in heap but their reference will goes in stack.

No comments: