首页 > 其他分享 >[Go] Stack and Heap, Garbage Collections

[Go] Stack and Heap, Garbage Collections

时间:2022-09-07 16:37:49浏览次数:63  
标签:function Garbage Collections Heap Go Stack

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

标签:function,Garbage,Collections,Heap,Go,Stack
From: https://www.cnblogs.com/Answer1215/p/16666136.html

相关文章