Skip to content

Commit

Permalink
refactor: detach app时清除对应事件
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow3aaa committed Oct 26, 2024
1 parent 4fb2cf5 commit e400679
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frame-analyzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ impl Analyzer {
}

self.map.remove(&pid).ok_or(AnalyzerError::AppNotFound)?;
self.buffer.retain(|pid_event| *pid_event != pid);
self.register_poll()?;

Ok(())
Expand Down Expand Up @@ -255,6 +256,7 @@ impl Analyzer {
/// ```
pub fn detach_apps(&mut self) {
self.map.clear();
self.buffer.clear();
}

/// Attempts to wait for a frametime value on this analyzer
Expand Down

0 comments on commit e400679

Please sign in to comment.