Why is the example code adding a job to the coroutine scope?
mddrill opened this issue · 1 comments
mddrill commented
In the viewmodel in the kotlin example, I see this code:
private val viewModelJob = Job()
private val coroutineScope = CoroutineScope(Dispatchers.Main + viewModelJob)
I'm trying to figure out why that viewModelJob is needed.
I see you're canceling the job when the viewmodel lifecycle ends. Will memory leaks happen if I use this library and forget to do that? If so, it might be nice to incorporate that behavior into the library somehow.