slice 底层结构
slice 的底层结构,了解 slice 的实现基础
Summary
a := [2]int{1,2} var b [2]int
a := []int{1,2} var b []int
Defination
// runtime/slice.go
type slice struct {
array unsafe.Pointer
len int
cap int
}nil切片 和 空切片
Last updated