Work around for several strange corner cases in Automatic Reference Counting in Apple's runtime

This commit is contained in:
Grant Limberg 2016-06-30 19:42:23 -07:00
commit ba0a45365c
5 changed files with 19 additions and 9 deletions

View file

@ -69,7 +69,7 @@ void sharedFileListDidChange(LSSharedFileListRef inList, void *context)
if (wantedURL == NULL || fileList == NULL)
return NULL;
NSArray *listSnapshot = (__bridge NSArray*)LSSharedFileListCopySnapshot(fileList, NULL);
NSArray *listSnapshot = (__bridge_transfer NSArray*)LSSharedFileListCopySnapshot(fileList, NULL);
for (id itemObject in listSnapshot) {
LSSharedFileListItemRef item = (__bridge LSSharedFileListItemRef) itemObject;
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;