Feeds:
Posts
Comments

Posts Tagged ‘stack vs heap’

Stack and heap memory

What is stored where?

Stack :

– local variables

Heap :

– instance variables

– static variables

– objects

Following  snippet will help to understand better.

stack_heap image

Advertisements

Read Full Post »