The difference between java heap and stack

 

 

            1. The memory storage stack and local variable storage heap memory is a solid;

            2. Stack memory update faster than heap memory, local variables because the life cycle is very short;

            3. Stack memory to store variable life cycle will be released soon end, but the entity will be stored in heap memory garbage collection from time to time of recovery.

Guess you like

Origin www.cnblogs.com/sea-stream/p/11361453.html
Recommended