Make SDAnimatedImageRep confirms to correct copy semantic
This commit is contained in:
parent
73cd294129
commit
2b95a12541
|
@ -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
|
// `NSBitmapImageRep`'s `imageRepWithData:` is not designed initializer
|
||||||
+ (instancetype)imageRepWithData:(NSData *)data {
|
+ (instancetype)imageRepWithData:(NSData *)data {
|
||||||
SDAnimatedImageRep *imageRep = [[SDAnimatedImageRep alloc] initWithData:data];
|
SDAnimatedImageRep *imageRep = [[SDAnimatedImageRep alloc] initWithData:data];
|
||||||
|
|
Loading…
Reference in New Issue