Skip to content

Load icons lazily and fix icon-related memory leaks#638

Merged
manuelmayer-dev merged 1 commit into
mainfrom
fix/icons-lazy-loading-memory-leaks
Jun 7, 2026
Merged

Load icons lazily and fix icon-related memory leaks#638
manuelmayer-dev merged 1 commit into
mainfrom
fix/icons-lazy-loading-memory-leaks

Conversation

@manuelmayer-dev

Copy link
Copy Markdown
Member

Icons are no longer kept in memory permanently and the GDI bitmaps created while displaying them are now disposed properly.

Icons are no longer kept in memory permanently and the GDI bitmaps
created while displaying them are now disposed properly.

- Remove the permanent Icon.IconBase64 cache; compute base64 on demand
- Stop eagerly generating/holding IconPack.IconPackIcon previews; generate
  them on demand and dispose after use
- Base64.GetBase64FromImage no longer disposes the caller-owned image
- Dispose IconImage instances at all consumers (DeckView, ButtonEditor,
  IconSelector, IconPackPreview) and on form close / list reload
- RoundedButton disposes its foreground (label) image on reassign/dispose
- Track and dispose the on-demand pack preview in ExtensionItemView
- Dispose label bitmaps in ProfileManager and ButtonLabel

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@manuelmayer-dev manuelmayer-dev added the improvement This improves something label Jun 7, 2026
@manuelmayer-dev manuelmayer-dev merged commit d784852 into main Jun 7, 2026
1 check passed
@manuelmayer-dev manuelmayer-dev deleted the fix/icons-lazy-loading-memory-leaks branch June 7, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement This improves something

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant