MVVM
-
Don’t pass context in viewmodel because main purpose of viewmodel is seperating ui releated stuff
-
Clearing the resources like if you’re executing some background task then you’ve responisilibty to clear or dispose them to avoid memory leaks I.e if you’re using rx then clear disposables inside onCleared function if you’re using coroutines then use appropriate scope like viewmodel scope