Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rob Pike has a Q&A at the end of his video where he answers (what sounds like) the exact same question you ask: http://youtu.be/f6kdp27TYZs?t=46m17s

Essentially, it gets garbage collected without you having to worry about it unless you're doing something fairly special.



Except that Rob Pike later in the golang-nuts groups expand on exactly that question: https://groups.google.com/d/topic/golang-nuts/bfuwmhbZHYw/di...

Qoute: "Goroutines are not garbage-collected. They must return from the top-level function (or panic) to have all their resources recovered."


Nice find! Although, he doesn't really answer the question, which had to be asked more than once in that video. I'd love to see a talk going in-depth on this topic alone.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: