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

fix(color) - Fix file handle leak in theme manager. #2911

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Dec 20, 2022

The ThemePersistance::scanThemeFolder method was not closing the file it opened, leaking a file handle for each theme on the SD card.

The themes are only scanned once on startup so not a huge issue on a radio.
However, at least on MacOS, this eventually crashes the simulator / companion if the radio is reloaded in the simulator or the simulator is closed and opened multiple times.

Summary of changes:

Close the file handle in ThemePersistance::scanThemeFolder.

@pfeerick pfeerick added bug 🪲 Something isn't working color Related generally to color LCD radios labels Dec 20, 2022
@pfeerick pfeerick added this to the 2.8.1 milestone Dec 20, 2022
@pfeerick pfeerick merged commit 866716b into EdgeTX:main Dec 20, 2022
mha1 pushed a commit to mha1/edgetx that referenced this pull request Dec 22, 2022
@philmoz philmoz deleted the file-handle-leak branch September 20, 2023 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working color Related generally to color LCD radios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants