[Bug]: Memory leak when disposing Krypton.Toolkit.PaletteBase and derived classes. #2104
Labels
area:toolkit
All issues related to the toolkit components.
bug
Something isn't working
regression
Something was working in a previous release, but isn't working now.
version:90
All things to do with V90.
version:95
All things to do with V95.
version:100
All things to do with V100.
Milestone
Describe the bug
The class "Krypton.Toolkit.PaletteBase" does not unsubscribe its "OnUserPreferenceChanged" method from the static rooted event "SystemEvents.UserPreferenceChanged", leading to objects persistently maintained in second generation garbage, i.e. memory leaks.
Derived classes also instantiate member controls that do not get disposed and become dangling objects.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All "PaletteBase" objects must be garbage collected.
Screenshots
Desktop:
Additional context
Some work has been done (Krypton_memory_fix.patch) to clean up resources, but due to unfamiliarity with the project it is unclear who the oner of created objects are. KryptonReadOnlyControls espesially is a point of concern and should be addressed. The provided patch might not be stable.
The text was updated successfully, but these errors were encountered: