摘要: defer 用于延迟函数的调用,每次defer都会把一个函数压入栈中,函数返回前再把延迟的函数取出并执行 数据结构 type _defer struct { sp uintptr //函数栈指针 pc uintptr //程序计数器 fn *funcval //函数地址 link *_defer / 阅读全文
posted @ 2021-08-31 17:38 CJ-cooper 阅读(168) 评论(0) 推荐(0) 编辑