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

C++ client leaks file descriptors on Windows #737

Closed
lukeocamden opened this issue Nov 15, 2019 · 2 comments
Closed

C++ client leaks file descriptors on Windows #737

lukeocamden opened this issue Nov 15, 2019 · 2 comments
Labels

Comments

@lukeocamden
Copy link

Hello, it looks like the non-Windows implementations of MemoryMappedFile::createNew and MemoryMappedFile::mapExisting close file decsriptors by creating OnScopeExit objects immediately after a successful open.

However these OnScopeExit objects are missing from the Windows implementations of MemoryMappedFile::createNew and MemoryMappedFile::mapExisting so the file descriptors are leaked. This means that a client will hold the files open throughout its lifetime, preventing them from being cleaned up.

If you agree, do you think it makes sense to add them?

Thanks!

@mjpt777
Copy link
Contributor

mjpt777 commented Nov 15, 2019

I've pushed a fix. Can you test if it works as expected for you now?

@mjpt777 mjpt777 added the bug label Nov 15, 2019
@lukeocamden
Copy link
Author

Works perfectly - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants