__unsafe_unretained does not prevent self retain-cycles when not under ARC

This commit is contained in:
Pierre-Olivier Latour
2014-04-09 11:10:45 -07:00
parent 811e45ab26
commit efad06f506
3 changed files with 12 additions and 0 deletions
+4
View File
@@ -277,7 +277,11 @@
return nil;
}
_uploadDirectory = [[path stringByStandardizingPath] copy];
#if __has_feature(objc_arc)
GCDWebUploader* __unsafe_unretained server = self;
#else
__block GCDWebUploader* server = self;
#endif
// Resource files
[self addGETHandlerForBasePath:@"/" directoryPath:[siteBundle resourcePath] indexFilename:nil cacheAge:3600 allowRangeRequests:NO];