charmbracelet / bubbletea

A powerful little TUI framework 🏗
MIT License
27.24k stars 788 forks source link

fix: stop and drain timers #993

Closed caarlos0 closed 5 months ago

caarlos0 commented 5 months ago

Stop the timers and drain them.

I got a situation in which this was causing a bubbletea app to use A LOT of ram.

Per my understanding, some timed commands were being fired twice sometimes... on most cases this might not be perceptible, but in this particular case, each of these commands generated another message, and the program went on double firing those too.

caarlos0 commented 5 months ago

after investigating a bit further, found what was causing the double fires: https://github.com/charmbracelet/mods/pull/252

this is still a good PR though, IMHO :)