Closed master255 closed 1 year ago
Hope you're doing well, thank you for reporting this.
Are you talking about a crash when an Android app finds itself onLowMemory()
and main activity
being whatever the main activity in an Android app? (wonder if you meant to report this on the FrostWire for Android repo, or if this is a jlibtorrent issue with your android app)
For some reason, Android does not do the memory cleanup itself when there is not enough memory in the system. This command forcibly starts the cleanup. With this command, the torrent app closes much less frequently.
so it then seems like a garbage collection issue with android and less a jlibtorrent issue.
I suppose then, if you have multiple Activities (like we do on FrostWire for Android), it makes sense to force garbage collection if this onLowMemory
callback is called.
Thank you!
Tracked down a rare bug. The app closes lowMemoryKiller if many torrents are added. This code fixes the problem completely.
@gubatron @proninyaroslav You need to add this to the main activity.