mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-04-08 17:05:59 +02:00
other: shrink the timed data vector in addition to clearing (#900)
Should prevent the times series vector from possibly growing indefinitely.
This commit is contained in:
parent
f52b66a844
commit
b7ac83e926
@ -196,6 +196,7 @@ impl DataCollection {
|
||||
};
|
||||
|
||||
self.timed_data_vec.drain(0..remove_index);
|
||||
self.timed_data_vec.shrink_to_fit();
|
||||
}
|
||||
|
||||
pub fn eat_data(&mut self, harvested_data: Box<Data>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user