fix(#530): Remove expired CGImages from cache#804
Open
mrunkel wants to merge 1 commit into
Open
Conversation
On long running systems, the cache would continue to grow. On my system, after running for 15 days, the Cache 983MB, almost of the total memory usage.
davidrudduck
added a commit
to davidrudduck/Ice
that referenced
this pull request
Apr 23, 2026
Resolved during build verification: HIDEventManager.swift (PR jordanbaird#893, jordanbaird#900): - Use NSApplication.shared.sendAction to open settings (AppState has no appDelegate) - Add .map + .removeDuplicates() to CombineLatest4 to prevent startAll/stopAll stack imbalance on repeated setting changes (reviewer finding: HIGH) - Call handlePreventShowOnHover before early return in fallback to avoid skipping hover suppression on settings-open click (reviewer finding: HIGH) ControlItem.swift (PR jordanbaird#893): - Move enableSecondaryContextMenu read inside Task body to avoid stale capture (reviewer finding: MEDIUM) - Read setting directly for synchronous rightMouseUp guard MenuBarOverlayPanel.swift (PR jordanbaird#803): - Replace removed WindowInfo.getOnScreenWindows() with createWindows(option:) - Fix validate() guard: returns Bool, not Optional (was always true) MenuBarItemImageCache.swift (PR jordanbaird#804): - Replace removed itemCache.allItems with itemCache.managedItems - Replace .info key with .tag key to match [MenuBarItemTag: CapturedImage] dict
3 tasks
pdurlej
pushed a commit
to pdurlej/Ice
that referenced
this pull request
May 24, 2026
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>
pdurlej
added a commit
to pdurlej/Ice
that referenced
this pull request
May 24, 2026
First "announced" Fire-fork release. Contents over fire.0:
* Re-implemented fix(overlay-panel) — secondary monitor clipping
(Philly Cai, originally PR jordanbaird#803, adapted to macos-26 API).
* Re-implemented fix(jordanbaird#530) — CGImage cache leak under long sessions
(Marc Runkel, originally PR jordanbaird#804, adapted to macos-26 API).
* Sparkle re-enabled with the fork's own EdDSA-signed appcast at
pdurlej.github.io/fire-releases.
* CI build-dmg.yml workflow corrected (contents: write permission
so softprops/action-gh-release can publish the release).
Bundle ID and app name unchanged — installs over any existing Ice
0.11.x build with full settings/layout/hotkey carry-over.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should fix Issue #530 On long-running systems, the CGImage cache would continue to grow.
On my system, after running for 15 days, the Cache is 983MB, almost half of the total memory usage.