Domanda di colloquio di SpaceX

Difference between stack and heap

Risposta di colloquio

Anonimo

8 lug 2015

stack is automatically handled. Stack is allocated at call of function then released when exiting function, it also allows to store local variables. heap is memory that lasts as long as needed and must be explicitly deleted using the delete or free function.