call FreeOSMemory in forceGc

This commit is contained in:
wwqgtxx
2024-09-12 09:57:21 +08:00
parent c6810bc441
commit 8f1c235af5

View File

@@ -9,6 +9,7 @@ import "C"
import (
"runtime"
"runtime/debug"
"cfa/native/config"
"cfa/native/delegate"
@@ -39,6 +40,7 @@ func reset() {
tunnel.CloseAllConnections()
runtime.GC()
debug.FreeOSMemory()
}
//export forceGc
@@ -47,5 +49,6 @@ func forceGc() {
log.Infoln("[APP] request force GC")
runtime.GC()
debug.FreeOSMemory()
}()
}