* call debug.FreeOSMemory() once in 5 minutes

This commit is contained in:
Simon Zolin
2020-09-04 14:23:51 +03:00
parent 45745943a5
commit 781f011419

View File

@@ -40,7 +40,7 @@ func memoryUsage() {
// periodically call "debug.FreeOSMemory" so // periodically call "debug.FreeOSMemory" so
// that the OS could reclaim the free memory // that the OS could reclaim the free memory
go func() { go func() {
ticker := time.NewTicker(15 * time.Second) ticker := time.NewTicker(5 * time.Minute)
for { for {
select { select {
case t := <-ticker.C: case t := <-ticker.C: