We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2096e82 commit d14979cCopy full SHA for d14979c
FastImageCache/FastImageCache/FastImageCache/FICImageCache.m
@@ -54,18 +54,15 @@ - (void)setDelegate:(id<FICImageCacheDelegate>)delegate {
54
}
55
56
57
-static FICImageCache *__imageCache = nil;
58
-
59
#pragma mark - Object Lifecycle
60
61
+ (instancetype)sharedImageCache {
62
- if (__imageCache == nil) {
63
- static dispatch_once_t onceToken;
64
- dispatch_once(&onceToken, ^{
65
- __imageCache = [[[self class] alloc] init];
66
- });
67
- }
68
+ static dispatch_once_t onceToken;
+ static FICImageCache *__imageCache = nil;
+ dispatch_once(&onceToken, ^{
+ __imageCache = [[[self class] alloc] init];
+ });
+
69
return __imageCache;
70
71
0 commit comments