|
|
|
|
|
by supersillyus
4793 days ago
|
|
You can leak memory by leaking goroutines.
If a goroutine is waiting on a channel that nobody else has access to, it lives forever, as does the memory it references. So, you can pretty easily leak memory without messing with unsafe things. |
|
It is also pretty easy to detect by this (or something better), which might be handy in a big program: http://play.golang.org/p/XmKfgQ4TmS