Articles → .NET → Stack And Heap
Stack And Heap
- What is stack?
- What is heap?
- Name
- Data type
- Value
Click to Enlarge
Stack
Click to Enlarge
function MyFunction() {
int arg1 = 5;
int arg2 = 6;
}
Click to Enlarge
- Value types (that holds memory and data on same location) are stored in stack.
- Stack is fixed sized.
- Stack only contains the variables of those functions that are running.
Heap
Click to Enlarge