diff --git a/SDWebImage/SDImageCacheConfig.m b/SDWebImage/SDImageCacheConfig.m index db4b194b..84123581 100644 --- a/SDWebImage/SDImageCacheConfig.m +++ b/SDWebImage/SDImageCacheConfig.m @@ -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; diff --git a/SDWebImage/SDWebImageDownloaderConfig.h b/SDWebImage/SDWebImageDownloaderConfig.h index ca41767b..1b5d833e 100644 --- a/SDWebImage/SDWebImageDownloaderConfig.h +++ b/SDWebImage/SDWebImageDownloaderConfig.h @@ -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. diff --git a/SDWebImage/SDWebImageDownloaderConfig.m b/SDWebImage/SDWebImageDownloaderConfig.m index 393d6e06..79e15c9d 100644 --- a/SDWebImage/SDWebImageDownloaderConfig.m +++ b/SDWebImage/SDWebImageDownloaderConfig.m @@ -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; }