Tuesday 7 January 2014

Value and reference types

Value types
Live on the stack. Examples of these types are the simple types like integers, and records

Reference types
Live on the heap. Examples of these types are objects, interfaces and pointers.

Strings are unusual because they live on both the stack and heap, behavior is on the stack and the storage is on the heap.



No comments:

Post a Comment