Merge pull request #2497 from nextcloud/fix/mac-folderwatcher-memory-leak

macOS: Fix memory leak in FolderWatcherPrivate::startWatching
This commit is contained in:
Michael Schuster 2020-10-02 19:30:26 +02:00 committed by GitHub
commit a0b351b145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 0 deletions

0
src/gui/folderman.cpp Executable file → Normal file
View file

1
src/gui/folderwatcher_mac.cpp Executable file → Normal file
View file

@ -100,6 +100,7 @@ void FolderWatcherPrivate::startWatching()
kFSEventStreamCreateFlagUseCFTypes | kFSEventStreamCreateFlagFileEvents | kFSEventStreamCreateFlagIgnoreSelf);
CFRelease(pathsToWatch);
CFRelease(folderCF);
FSEventStreamScheduleWithRunLoop(_stream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
FSEventStreamStart(_stream);
}

0
src/gui/folderwatcher_mac.h Executable file → Normal file
View file