steveliles/Foredroid

Memory Leak

Closed this issue · 4 comments

Hi there.
I got a memory leak ( from Canary Leak ) coming from Foreground.current
I'm only doing this Foreground.get(application).addListener(foregroundListener)
in onCreate and unbinding in onDestroy.
Any ideas?

I can spot one way that this could possibly happen - in the conditional branch starting at line 122 when you go background current is not nullified, which probably qualifies as a leak.

I'm not actively working on any projects where I can look into this ... would be awesome if you're willing to try it out and raise a PR?

I made the change but do not have access to push to a new branch.

@EscapeArtist cool, can you create a pull request?

Have experienced the same issue, and it is causing significant memory leaks. I have submitted a PR to resolve the issue, linked above.