Description
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
When adding a widget to a container.NewThemeOverride, the widget and its override theme are stored in the overrides
map. This is never cleaned out except when a window is closing. This is because the deletion of the widget's entry in the overrides
map happens in cache.DestroyRenderer
, but that function is only called when a window is closing. Elsewhere (eg in the regular clean task), renderers are directly destroyed instead of by calling this function, which misses the deletion of the entry from the overrides map, if that widget had a theme override.
How to reproduce
just check the code as described above. Or create an app that cycles through new widgets, applying an override to them, and then not using them. It will leak memory
Screenshots
No response
Example code
n/a
Fyne version
2.5.0
Go compiler version
n/a
Operating system and version
n/a
Additional Information
No response
Activity