What stores in stack?
What stores in Heap?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 9, 2013, 12:46 PM
Everything else is stored on the heap.
Where local variables or value parameters refer to reference types (such as string, object etc), only the reference is stored on the stack. The object itself (unless the reference is null) is stored on the heap.
VulpesPosted Jul 9, 2013, 1:20 PM
In all other cases, it's stored on the heap.
Sreekanth ReddyPosted Jul 9, 2013, 1:12 PM
VulpesPosted Jul 9, 2013, 1:06 PM
However, static variables are always stored on the heap.
Sreekanth ReddyPosted Jul 9, 2013, 1:04 PM
Iftikar HussainPosted Jul 9, 2013, 12:54 PM
Please refer the below link.
http://gribblelab.org/CBootcamp/7_Memory_Stack_vs_Heap.html
Regards,
Iftikar