[Go] Stack and Heap, Garbage Collections
Stack is dedicated to function
- Local variables are store in stack
- Deallocated after function completes
Heap is persisten
Carbage Collections
- Go is a compiled language which enables garbage collection
- Implementation is fast
- Compiler determines stack vs heap
- Garbage collection in the background