Closed pocmo closed 5 years ago
We could also look at custom solutions - maybe in conjunction with LeakCanary. In our browser apps we primary care about Activities, Fragments, EngineSessions, GeckoSessions, ...
We could take a look at LeakCanary 2 looks pretty promising:
Talk about LeakCanary 2 https://youtu.be/LEX8dn4BLUw?list=PLn7H9CUCuXAu5r4kT8RcK8B2GuBqMODX3
Yeah, just saw this too, this looks promising: https://speakerdeck.com/pyricau/leakcanary-2?slide=28
LeakCanary depends on androix-core 2.0 alpha something. Can't use it yet. :|
The old version of LeakCanary also supports running in instrumentation. I'll try experimenting with that.
Yay, I'm able to reproduce #3887 with a ui test and leak canary.
Closing this for now: We now have a LeakDetectionRule that we can use in AC and apps. And we have an additional UI test that protects us against a leak we saw in the past.
We have been investigating and fixing leaks in our apps and components. Hunting them and fixing them is always challenging and time consuming. The scary part is that we often did not notice them for a long time and "randomly" stumbled upon them. We desperately need tooling to discover them automatically and way earlier.
The only tool I know is LeakCanary. It's primary use case is detecting leaks while using the app.
Ideally we'd be able to detect such leaks in automation and in the best case can correlate them with a specific commit that introduced them.
┆Issue is synchronized with this Jira Task