logoalt Hacker News

Ternaritoday at 3:17 AM0 repliesview on HN

>you need to watch over and destruct goroutines manually to prevent memory leaks

No, you don’t. Any stack-allocated resources are freed when the function returns. WaitGroup is just there for synchronization.