mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-05-28 23:21:07 +08:00
Merge pull request #1871 from maicki/MSMoveDeallocASImgeNode
[ASImageNode] Move dealloc method from ASImageNode+AnimatedImage category to ASImageNode
This commit is contained in:
@@ -233,7 +233,11 @@ NSString *const ASAnimatedImageDefaultRunLoopMode = NSRunLoopCommonModes;
|
||||
return frameIndex;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
@end
|
||||
|
||||
@implementation ASImageNode(AnimatedImageInvalidation)
|
||||
|
||||
- (void)invalidateAnimatedImage
|
||||
{
|
||||
ASDN::MutexLocker l(_displayLinkLock);
|
||||
#if ASAnimatedImageDebug
|
||||
|
||||
@@ -110,6 +110,12 @@ struct ASImageNodeDrawParameters {
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
// Invalidate all components around animated images
|
||||
[self invalidateAnimatedImage];
|
||||
}
|
||||
|
||||
#pragma mark - Layout and Sizing
|
||||
|
||||
- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize
|
||||
|
||||
@@ -31,3 +31,10 @@ extern NSString *const ASAnimatedImageDefaultRunLoopMode;
|
||||
@property (atomic, assign) CFTimeInterval lastDisplayLinkFire;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface ASImageNode (AnimatedImageInvalidation)
|
||||
|
||||
- (void)invalidateAnimatedImage;
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user