This commit is contained in:
Antonio Scandurra 2022-05-23 09:48:00 +02:00
parent 663173d2f5
commit ce46efff2e

View File

@ -37,6 +37,9 @@ impl Drop for State {
fn drop(&mut self) { fn drop(&mut self) {
unsafe { unsafe {
cf::CFRelease(self.paths); cf::CFRelease(self.paths);
fs::FSEventStreamStop(self.stream);
fs::FSEventStreamInvalidate(self.stream);
fs::FSEventStreamRelease(self.stream);
} }
} }
} }
@ -133,9 +136,6 @@ impl EventStream {
); );
fs::FSEventStreamStart(self.state.stream); fs::FSEventStreamStart(self.state.stream);
cf::CFRunLoopRun(); cf::CFRunLoopRun();
fs::FSEventStreamStop(self.state.stream);
fs::FSEventStreamInvalidate(self.state.stream);
fs::FSEventStreamRelease(self.state.stream);
} }
} }