perf: Run the garbage collector after writing dex files

Writing dex files consumes a lot of memory.
This commit is contained in:
oSumAtrIX 2023-10-10 20:06:27 +02:00
parent 642c4ea97e
commit d9fb241d57
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -115,6 +115,8 @@ class BytecodeContext internal constructor(private val options: PatcherOptions)
) { _, entryName, _ -> logger.info("Compiled $entryName") }
}.listFiles(FileFilter { it.isFile })!!.map { PatcherResult.PatchedDexFile(it.name, it.inputStream()) }
System.gc()
return patchedDexFileResults
}