Commit 988f124
fix(jordanbaird#530): Remove expired CGImages from cache
Adapted from upstream PR jordanbaird#804 by Marc A. Runkel for the macos-26
baseline: the original referenced `MenuBarItemManager.ItemCache.allItems`
(removed on macos-26 when ItemCache was simplified — the all/managed
distinction was dropped). Replaced with `ItemCache.managedItems`. The
cache-key type also changed: macos-26 keys MenuBarItemImageCache.images
by `MenuBarItemTag`, not `MenuBarItemInfo`. Filter-then-merge order
preserved from the original; behavioural intent is identical — sweep
the image cache and drop entries whose key no longer matches any
currently-managed menu bar item, addressing the memory growth reported
in upstream issue jordanbaird#530.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 070cc03 commit 988f124
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
268 | 274 | | |
269 | 275 | | |
270 | 276 | | |
| |||
0 commit comments