Loading

摘要: 对于一个 Go 局部变量,如何确定它被分配在堆上还是栈上? 按照官方 FAQ How do I know whether a variable is allocated on the heap or the stack? 的解释: Go 编译器会尽可能将变量分配在栈上 以下两种情况,Go 编译器会将 阅读全文
posted @ 2021-10-20 16:31 拾月凄辰 阅读(84) 评论(0) 推荐(0)