Merge pull request #2371 from zhongwuzw/remove-unnecessary-copy
Remove unnecessary copy
This commit is contained in:
commit
8dc39b17fe
|
@ -50,7 +50,7 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
|||
config.maxCacheSize = self.maxCacheSize;
|
||||
config.maxMemoryCost = self.maxMemoryCost;
|
||||
config.maxMemoryCount = self.maxMemoryCount;
|
||||
config.namespacePrefix = [self.namespacePrefix copyWithZone:zone];
|
||||
config.namespacePrefix = self.namespacePrefix;
|
||||
config.fileManager = self.fileManager; // NSFileManager does not conform to NSCopying, just pass the reference
|
||||
config.memoryCacheClass = self.memoryCacheClass;
|
||||
config.diskCacheClass = self.diskCacheClass;
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) {
|
|||
* Set the default URL credential to be set for request operations.
|
||||
* Defaults to nil.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) NSURLCredential *urlCredential;
|
||||
@property (nonatomic, copy, nullable) NSURLCredential *urlCredential;
|
||||
|
||||
/**
|
||||
* Set username using for HTTP Basic authentication.
|
||||
|
|
|
@ -37,9 +37,9 @@ static SDWebImageDownloaderConfig * _defaultDownloaderConfig;
|
|||
config.sessionConfiguration = [self.sessionConfiguration copyWithZone:zone];
|
||||
config.operationClass = self.operationClass;
|
||||
config.executionOrder = self.executionOrder;
|
||||
config.urlCredential = [self.urlCredential copyWithZone:zone];
|
||||
config.username = [self.username copyWithZone:zone];
|
||||
config.password = [self.password copyWithZone:zone];
|
||||
config.urlCredential = self.urlCredential;
|
||||
config.username = self.username;
|
||||
config.password = self.password;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue