Skip to content

SP4: Improve Bitmap disposal as controls are unloaded#3023

Merged
swharden merged 4 commits intoScottPlot:mainfrom
KroMignon:UndisposeBitmaps
Nov 29, 2023
Merged

SP4: Improve Bitmap disposal as controls are unloaded#3023
swharden merged 4 commits intoScottPlot:mainfrom
KroMignon:UndisposeBitmaps

Conversation

@KroMignon
Copy link
Contributor

ControlBackEnd implements now IDisposable.

When disposing (or on destruction), all bitmaps in OldBitmaps queue and Bmp are disposed to avoid memory overflow.

This should fix issue #2902

ControlBackEnd implements now `IDisposable`.

When disposing (or on destruction), all bitmaps in `OldBitmaps` queue and `Bmp` are disposed to avoid memory overflow.
@swharden swharden changed the title SP4: Undispose Bitmaps SP4: Improve Bitmap disposal as controls are unloaded Nov 29, 2023
@swharden
Copy link
Member

Great work @KroMignon, thanks so much!

I opened #3029 to track progress toward a similar fix in ScottPlot 5. It doesn't have to be resolved right away because I'm still refactoring the rendering system, but this topic will be revisited again as ScottPlot 5 matures.

Thanks again! 🚀

@swharden swharden merged commit 3953396 into ScottPlot:main Nov 29, 2023
@KroMignon KroMignon deleted the UndisposeBitmaps branch January 23, 2024 08:56
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.

SP5: Improve Bitmap disposal as controls are unloaded SP4 FormsPlot: Undisposed bitmaps

2 participants