diff --git a/SDWebImage/SDImageCachesManager.m b/SDWebImage/SDImageCachesManager.m index 1ef33e85..52694704 100644 --- a/SDWebImage/SDImageCachesManager.m +++ b/SDWebImage/SDImageCachesManager.m @@ -36,8 +36,8 @@ self.containsOperationPolicy = SDImageCachesManagerOperationPolicySerial; self.clearOperationPolicy = SDImageCachesManagerOperationPolicyConcurrent; // initialize with default image caches - self.caches = @[[SDImageCache sharedImageCache]]; - self.cachesLock = dispatch_semaphore_create(1); + _caches = @[[SDImageCache sharedImageCache]]; + _cachesLock = dispatch_semaphore_create(1); } return self; } diff --git a/SDWebImage/SDImageCodersManager.h b/SDWebImage/SDImageCodersManager.h index e4276464..cd77091a 100644 --- a/SDWebImage/SDImageCodersManager.h +++ b/SDWebImage/SDImageCodersManager.h @@ -17,10 +17,10 @@ Note: the `coders` getter will return the coders in their reversed order Example: - - by default we internally set coders = `IOCoder`, `GIFCoder` - - calling `coders` will return `@[IOCoder, GIFCoder]` + - by default we internally set coders = `IOCoder`, `GIFCoder`, `APNGCoder` + - calling `coders` will return `@[IOCoder, GIFCoder, APNGCoder]` - call `[addCoder:[MyCrazyCoder new]]` - - calling `coders` now returns `@[IOCoder, GIFCoder, MyCrazyCoder]` + - calling `coders` now returns `@[IOCoder, GIFCoder, APNGCoder, MyCrazyCoder]` Coders ------ diff --git a/SDWebImage/SDImageCodersManager.m b/SDWebImage/SDImageCodersManager.m index 77522cd4..e358542b 100644 --- a/SDWebImage/SDImageCodersManager.m +++ b/SDWebImage/SDImageCodersManager.m @@ -31,8 +31,7 @@ - (instancetype)init { if (self = [super init]) { // initialize with default coders - NSMutableArray> *mutableCoders = [@[[SDImageIOCoder sharedCoder], [SDImageGIFCoder sharedCoder], [SDImageAPNGCoder sharedCoder]] mutableCopy]; - _coders = [mutableCoders copy]; + _coders = @[[SDImageIOCoder sharedCoder], [SDImageGIFCoder sharedCoder], [SDImageAPNGCoder sharedCoder]]; _codersLock = dispatch_semaphore_create(1); } return self; diff --git a/SDWebImage/SDImageLoadersManager.m b/SDWebImage/SDImageLoadersManager.m index 04607439..ecb476c5 100644 --- a/SDWebImage/SDImageLoadersManager.m +++ b/SDWebImage/SDImageLoadersManager.m @@ -30,8 +30,8 @@ self = [super init]; if (self) { // initialize with default image loaders - self.loaders = @[[SDWebImageDownloader sharedDownloader]]; - self.loadersLock = dispatch_semaphore_create(1); + _loaders = @[[SDWebImageDownloader sharedDownloader]]; + _loadersLock = dispatch_semaphore_create(1); } return self; }