Jul 11, 2021
Please be careful on how you collect Flow.
You should not use collect directly in launch. It’s better to use launchWhenStared with job cancellation on destroy or the newest methods: repeatOnLifecycle or flowWithLifecycle.
Flow has a subscription counter and if you don’t cancel the collecting job manually then it will be still in memory : )