Skip to content

Commit

Permalink
Merge pull request #981 from mythodeia/master
Browse files Browse the repository at this point in the history
initialise kPNGSignatureData data
  • Loading branch information
bpoplauschi committed Dec 17, 2014
2 parents 6698910 + b271cbb commit 6b137fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SDWebImage/SDImageCache.m
Expand Up @@ -48,7 +48,6 @@ + (SDImageCache *)sharedImageCache {
static id instance;
dispatch_once(&once, ^{
instance = [self new];
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
});
return instance;
}
Expand All @@ -61,6 +60,9 @@ - (id)initWithNamespace:(NSString *)ns {
if ((self = [super init])) {
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];

// initialise PNG signature data
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];

// Create IO serial queue
_ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL);

Expand Down

0 comments on commit 6b137fb

Please sign in to comment.