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 Windows list dir handle leak #64461

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

bitsawer
Copy link
Member

Fixes a handle leak on Windows when calling list_dir_begin() and forgetting to call list_dir_end(). For example, the code example in https://docs.godotengine.org/en/stable/classes/class_directory.html currently leaks the find handle every time it is called. This PR adds a call to list_dir_end() to the DirAccessWindows destructor, similar to other platform versions. Probably should be cherry-picked to 3.x, or does this need a separate PR for a fix this simple?

@bitsawer bitsawer requested a review from a team as a code owner August 15, 2022 17:43
@Chaosus Chaosus added this to the 4.0 milestone Aug 15, 2022
@mhilbrunner mhilbrunner added cherrypick:3.x Considered for cherry-picking into a future 3.x release cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Aug 19, 2022
@mhilbrunner mhilbrunner merged commit 47d3fd9 into godotengine:master Aug 19, 2022
@mhilbrunner
Copy link
Member

mhilbrunner commented Aug 19, 2022

Thank you! 🎉 Should hopefully be cherry-pickable, if not, it's an easy backport.

@akien-mga
Copy link
Member

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Aug 24, 2022
@akien-mga
Copy link
Member

Cherry-picked for 3.5.1.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Aug 30, 2022
@bitsawer bitsawer deleted the fix_windows_list_dir branch March 15, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants