Import: Purge frees decoded GIFs; a browser tab keeps less of one GIF (#567 follow-up)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f
This commit is contained in:
Claude
2026-10-10 12:50:12 +00:00
parent e625ef3bef
commit ab09f219d4
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -304,13 +304,15 @@ impl MediaPool {
let mut c = lock(&self.inner.cache);
c.lru = Lru::default();
c.last.clear();
drop(c);
// Decoded GIFs sit outside the frame budget; Purge frees them too.
lock(&self.inner.gifs).clear();
}
/// Drop every cached frame and decoder.
pub fn clear(&self) {
self.clear_frames();
lock(&self.inner.sources).clear();
lock(&self.inner.gifs).clear();
}
/// Forget a file (after it changed on disk, or to retry a file that failed to open).