Slicing a large array keeps the entire array in memory, even if the slice is small:
big := make([]int, 1000000)
small := big[0:10] // big array stays in memory
If you only need the small portion, copy it to free the large array:
small := make([]int, 10)
copy(small, big[0:10])
// now big can be garbage collected
This matters when processing large data where you keep only summaries.