Last active
December 16, 2015 00:29
-
-
Save fizx/5348236 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
buf := make([]int, 0) | |
buf = append(buf, 0, 1, 2, 3) | |
sub := buf[0:2] //hang on to a reference of the beginning of the vector | |
for { | |
for i := 0; i < 1000; i++ { | |
buf = append(buf, i) | |
} | |
buf = buf[999:1000] | |
} | |
sub = sub | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment