LeakCanary beta 3 correctly sees BiometricPrompt holding on to the mAuthenticationCallback field. Logcat snippets showing both versions processing the leaking event are here.
Sample project: https://github.com/msfjarvis/leakcanary-test-project
d3f9bbfedf78fc3bdb2ecc889e7bfc4637835fa3, so you can be on LeakCanary beta 3. master and repeat step 2, LeakCanary will dump heap and analyze it again, but will fail to find any leaks.Expected behavior: LeakCanary beta 4 should also see the leak
This exact leak also seems to exist in FingerprintManager as well and was never fixed. I haven't found any fixes or workarounds yet so an update to framework leaks might be in order.
@msfjarvis Thanks for the detailed report! Can you share the hprof file from the leak found in Beta 3? That way I can repro automatically & git bissect.
@msfjarvis Thanks for the detailed report! Can you share the hprof file from the leak found in Beta 3? That way I can repro automatically & git bissect.
Absolutely, there you go. 2019-11-25_21-47-40_879.hprof
Thanks, reproduced, bisecting now.
Edit: according to git bisect, bad commit is 879ab7ce807c3d6a3c3a7674cd559df772276d8b . Looking into it.
Thanks a ton for the bug report! This is pretty bad, I'll make a new release ASAP.
Glad to be of assistance :-)
I want to follow up about the potential framework leaks in BiometricPrompt and FingerprintManager, should I start another issue for those?
Definitely!