https://medium.com/adidoescode/the-viewmodels-leaked-flow-collectors-problem-239a327f4b56
A very simple app with an Ui made in compose, which displays a count that increments over time and a Refresh button that is supposed to start the count from the start. The count is coming from a ViewModel that has the leaked collector problem. Pressing several times the Refresh button will produce unexpected results, leaking collectors and emitting more times than expected.You'll find another ViewModel called FixedViewModel with a correct implementation. It's spossible to try it out by uncommenting one line in the Activity.
