Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wpf: Fix GDI handle issues when using resized Bitmaps #2552

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

cwensley
Copy link
Member

@cwensley cwensley commented Sep 11, 2023

This fixes an issue if you keep many resized images in memory, each one will use upwards of 4+ GDI handles, and since there's only 10000 available per process this can cause a COMException. The main takeaway here is we should never be storing a WPF RenderTargetBitmap as it can exhaust GDI handles pretty easily especially when dealing with numerous small bitmaps.

See dotnet/wpf#3067 for more context.

@cwensley cwensley added the bug label Sep 11, 2023
@cwensley cwensley added this to the 2.8.1 milestone Sep 11, 2023
@cwensley cwensley merged commit 9826d7c into picoe:develop Sep 11, 2023
3 checks passed
@cwensley cwensley deleted the curtis/wpf-fix-gdi-handles-issue branch September 11, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant