What is Stack and Heap?
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiub7cUiOZh2Op9xRA8nBjyvEGOk7TG7swcTZS1jzkX3a-ClBb8kxiEuGs0cM7wKBqDtfUxOV49nSmLxAbxhIoGh10mT-rKr_C_wO3oO8e51j6bJf81SF_W37RArmyBWiYNGFGV8Js_bBdz/s320/StackandHeap.png)
Ex. data type variables -> i,y,cls1 etc
reference type memory location -> ref
value type data -> 4,2
Heap is a memory location where object of reference type data types
are stored.
Ex. Object of class class1, see the figure.
CLR always looks for data in stack first, if
reference type data type found then jumps to heap.
No comments:
Post a Comment