https://github.com/golang/go/wiki/SliceTricks
*NOTE* If the type of the element is a *pointer* or a struct with pointer fields, which need to be garbage collected, the above implementations of Cut and Delete have a potential *memory leak* problem: some elements with values are still referenced by slice a and thus can not be collected. The following code can fix this problem: Does it still valid for the latest gc? In other words, does gc 1.9 still check the segment [len(s), cap[s]) of a slice s to find active pointers? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.