http://play.golang.org/p/NPFe_eRy2q
Does the garbage collector takes the length of a slice in account when it
looks for reachable objects ?
I mean, can GC consider the elements at indices between "length" and
"capacity" as garbage, collect them, and put a nil pointer at these indices
?
I imagine that these objects are not garbage collected, but it is not very
explicit in the specs.
And I don't see the reason why it would be forbidden...
Or it is expected that when a slice is resliced to its full length, all
objects that were "hidden" are expected to have stayed at their place...
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.