Up until now I used to collect my flows either in activity/fragment or in ViewModel like so

Activity/Fragment

```kotlin
  lifecycleScope.launch {
            myViewModel.readTokenCredentials().collect { data -> /* do something */ }
        }

```

ViewModel

```kotlin

viewModelScope.launch {
            prefsRepo.readTokenCredentials().collect { data -> /* do something */ }
        }

```

Now Google devs [tell](https://youtu.be/fSB6_KE95bU?t=687) us that this is not a safe way to collect flows because it could lead to memory leaks. Instead they recommend wrapping the collection in `lifecycle.repeatOnLifecycle` for flow collection in Activities/Fragments.

```kotlin
lifecycleScope.launch {
    lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) {
        myViewModel.readTokenCredentials().collect { data -> /* do something */ }
    }   
}

```

My question is:

Why can't I use `repeatOnLifecycle` with `viewModelScope` when collecting flows inside the view model? Of course I know view model is not lifecycle aware but is perhaps `viewModelScope` less likely to introduce memory leaks during flow collection?