Dave’s Brain
Home
Search
Browse
Recent
Keywords
Other sites
Feedback
Sign in
Random
Crawlers
Programming Tips
- Go: Disable/trigger garbage collection
Date:
2019sep21
Language:
Go
Keywords:
golang
Q.
Go: Disable/trigger garbage collection
A.
Disable the garbage collector:
debug.SetGCPercent(-1)
Trigger garbage collection:
runtime.GC()