3 ms·
You can set the environment variable GOGC=off [1] There doesn't actually seem to be a way to explicitly free memory though so I doubt this is actually used. [
by bitdivision 11y ago
You can set the environment variable GOGC=off [1]
There doesn't actually seem to be a way to explicitly free memory though so I doubt this is actually used.
[1]: https://golang.org/pkg/runtime/ https://golang.org/pkg/runtime/
- Zancarius 11y agoIt's only intended for debugging purposes, near as I can tell (and I'm not sure why anyone would want to do it in the first place beyond debugging): https://github.com/golang/go/issues/13761#issuecomment-167721220 https://github.com/golang/go/issues/13761#issuecomment-16772...