mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2025-04-01 21:06:16 +03:00
call FreeOSMemory in forceGc
This commit is contained in:
parent
c6810bc441
commit
8f1c235af5
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue