From 85fee6b609612fcc6161ef2b2a72f72ea3f044ec Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 8 Sep 2016 14:25:00 -0700 Subject: [PATCH] Fix the dealloc test (#2216) --- AsyncDisplayKitTests/ASDisplayNodeTests.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index aa4789a33d..e673fe5df0 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -80,7 +80,7 @@ for (ASDisplayNode *n in @[ nodes ]) {\ @end @interface ASTestDisplayNode : ASDisplayNode -@property (nonatomic, copy) void (^willDeallocBlock)(ASTestDisplayNode *node); +@property (nonatomic, copy) void (^willDeallocBlock)(__unsafe_unretained ASTestDisplayNode *node); @property (nonatomic, copy) CGSize(^calculateSizeBlock)(ASTestDisplayNode *node, CGSize size); @property (nonatomic) BOOL hasFetchedData; @@ -1044,7 +1044,7 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point [self executeOffThread:^{ @autoreleasepool { ASTestDisplayNode *node = [[ASTestDisplayNode alloc] init]; - node.willDeallocBlock = ^(ASDisplayNode *n){ + node.willDeallocBlock = ^(__unsafe_unretained ASDisplayNode *n){ XCTAssertTrue([NSThread isMainThread], @"unexpected node dealloc %@ %@", n, [NSThread currentThread]); didDealloc = YES; };