impliment garbage collection and move init

This commit is contained in:
2023-03-25 18:19:48 +00:00
parent fa32f7b824
commit bfad2775ee
11 changed files with 64 additions and 31 deletions

15
src/garbageCollect.go Normal file
View File

@@ -0,0 +1,15 @@
package main
import (
"runtime"
"time"
)
func garbageCollect() {
go func() {
for {
time.Sleep(10 * time.Second)
runtime.GC()
}
}()
}