Closed jakoss closed 4 years ago
In a Fragment
you should use viewLifecycleOwner.lifecycleScope
instead of lifecycleScope
. That's the only issue as far as I can see.
BTW the full leakcanary stacktrace is also available in logcat so it'd be easier to share that instead of screenshots 😄 .
Please let me know if that fixes the leak for you.
Wow, didn't know that viewLifecycleOwner
has it's own coroutine scope. I learned something new, that's always good.
I can confirm that this indeed solves the issue
Hi,
LeakCanary just showed me this:
It seems like the root of the leak is the lifecycle registry:
Do you an idea why this is happening?
The code that caused that is: