galex
10/25/2023, 2:46 PMProcessLifecycleOwner.get().lifecycle.coroutineScope
injected with Dagger in lots of ViewModels to perform network requests that are to be done no matter what happens to the lifecycle of the ViewModel.
I am purposely trying to prove that this is a really bad practice, so with the help of LeakCanary I am running code that looks like this:
processScope.launch {
delay(10 * 60 * 1000)
doSomeNetworkRequest(someParameter)
}
But this doesn't trigger a leak, apparently.
What am I missing?Eduardo Dantas
10/25/2023, 3:32 PMEduardo Dantas
10/25/2023, 5:10 PMgalex
10/26/2023, 7:03 AMgildor
11/14/2023, 7:01 AM