mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2024-11-16 11:42:30 +08:00
call FreeOSMemory in forceGc
This commit is contained in:
parent
c6810bc441
commit
8f1c235af5
|
@ -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()
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user