by ewencp · 13y ago · 0 comments
Of course, whether this is a real issue or not also depends on whether you're writing internal or external APIs. There are lots of other ways to generate uncollectible garbage too...
https://groups.google.com/forum/#!topic/golang-nuts/RmfHSHE9...
Note that there is no requirement that you close channels-- they aren't like file descriptors. They will be garbage collected after they're no longer needed.
goroutines, on the other hand, will stick around unless you clean them up. goroutines aren't iterators, and you shouldn't use them as iterators. They're more analogous to threads.