perf(memory): release Go heap and decoded image caches on OS memory pressure

This commit is contained in:
zarzet
2026-07-14 09:09:42 +07:00
parent f983a303fd
commit 96eb412fe5
4 changed files with 41 additions and 0 deletions
@@ -3043,6 +3043,12 @@ class MainActivity: FlutterFragmentActivity() {
}
result.success(null)
}
"releaseMemory" -> {
withContext(Dispatchers.IO) {
Gobackend.releaseMemory()
}
result.success(null)
}
"getLogCount" -> {
val count = withContext(Dispatchers.IO) {
Gobackend.getLogCount()