我在 Github 上看到了issue,它說 sync.Pool should be used?only?with pointer types,例如:var TPool = sync.Pool{? ? New: func() interface{} {? ? ? ?return new(T)? ? },}是否有意義?怎么樣return T{},哪個是更好的選擇,為什么?
- 2 回答
- 0 關注
- 141 瀏覽
添加回答
舉報
0/150
提交
取消