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

DirectoryMonitor instances leak if not explicitly stopped #518

Open
jbmorley opened this issue Dec 1, 2022 · 1 comment
Open

DirectoryMonitor instances leak if not explicitly stopped #518

jbmorley opened this issue Dec 1, 2022 · 1 comment
Labels
bug Something isn't working ios Impacts the iOS app macos Impacts the macOS app
Milestone

Comments

@jbmorley
Copy link
Collaborator

jbmorley commented Dec 1, 2022

The DirectoryMonitor update block retains self, meaning that there's a retain cycle. We need to break this retain cycle to ensure that directory monitors automatically stop and are cleaned up when they go out of scope. Unfortunately, it seems that EonilFSEventStream doesn't retain it's self reference before calling its completion block, meaning that the newly released self can disappear before calling the callback block, leading to a crash.

@jbmorley
Copy link
Collaborator Author

jbmorley commented Dec 1, 2022

As part of this fix, we should explore whether we need a dedicated deinit in DirectoryMonitor to ensure everything is cancelled.

@jbmorley jbmorley added this to the Next milestone Dec 2, 2022
@jbmorley jbmorley added bug Something isn't working macos Impacts the macOS app ios Impacts the iOS app labels Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios Impacts the iOS app macos Impacts the macOS app
Projects
None yet
Development

No branches or pull requests

1 participant