Skip to content

fix(#530): Remove expired CGImages from cache#804

Open
mrunkel wants to merge 1 commit into
jordanbaird:mainfrom
mrunkel:main
Open

fix(#530): Remove expired CGImages from cache#804
mrunkel wants to merge 1 commit into
jordanbaird:mainfrom
mrunkel:main

Conversation

@mrunkel
Copy link
Copy Markdown

@mrunkel mrunkel commented Dec 3, 2025

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.

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
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant