cjbassi / ytop

A TUI system monitor written in Rust
MIT License
2.16k stars 84 forks source link

Fix Memory Leaks #98

Open CosmicHorrorDev opened 4 years ago

CosmicHorrorDev commented 4 years ago

I think the commit messages cover the overall changes pretty well. This is to address #96 which is caused by storing samples indefinitely. This follows the solution of keeping track of the maximum width used as a threshold for the number of samples to keep.

CosmicHorrorDev commented 4 years ago

Note: There's been some additional discussion in #96 about using some data structure other than a Vec to simplify the logic surrounding dropping old elements and keeping track of the max size.