Merge pull request #3258 from GetToSet/sdanimatedimagerep-copy-semantic
Make SDAnimatedImageRep confirms to correct copy semantic
This commit is contained in:
commit
923e175326
|
@ -27,6 +27,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
SDAnimatedImageRep *imageRep = [super copyWithZone:zone];
|
||||
CFRetain(imageRep->_imageSource);
|
||||
return imageRep;
|
||||
}
|
||||
|
||||
// `NSBitmapImageRep`'s `imageRepWithData:` is not designed initializer
|
||||
+ (instancetype)imageRepWithData:(NSData *)data {
|
||||
SDAnimatedImageRep *imageRep = [[SDAnimatedImageRep alloc] initWithData:data];
|
||||
|
|
Loading…
Reference in New Issue