Afzal Najam
10/14/2020, 5:18 PMviewModelScope.cancel()
In ViewModels?
I see that the documentation for ViewModel.kt says:
* This scope will be canceled when ViewModel will be cleared, i.e [ViewModel.onCleared] is calledBut I can't find the code that actually calls
close()
flosch
10/14/2020, 5:29 PMviewModelScope
implementationAfzal Najam
10/14/2020, 5:33 PMviewModelScope
in the bagOfTags
using setTagIfAbsent
.
And that's closed when ViewModel.clear()
is called. Great, thanks!