diff --git a/Libraries/Image/RCTUIImageViewAnimated.h b/Libraries/Image/RCTUIImageViewAnimated.h index 8b19147b248..1c894a849d1 100644 --- a/Libraries/Image/RCTUIImageViewAnimated.h +++ b/Libraries/Image/RCTUIImageViewAnimated.h @@ -8,8 +8,6 @@ #import #import -RCT_EXTERN void RCTUIImageViewEnableWeakProxy(BOOL enabled); - @interface RCTUIImageViewAnimated : UIImageView @end diff --git a/Libraries/Image/RCTUIImageViewAnimated.m b/Libraries/Image/RCTUIImageViewAnimated.m index f5c17d7e3e9..01aa75f391c 100644 --- a/Libraries/Image/RCTUIImageViewAnimated.m +++ b/Libraries/Image/RCTUIImageViewAnimated.m @@ -11,11 +11,6 @@ #import #import -static BOOL weakProxyEnabled = YES; -void RCTUIImageViewEnableWeakProxy(BOOL enabled) { - weakProxyEnabled = enabled; -} - static NSUInteger RCTDeviceTotalMemory() { return (NSUInteger)[[NSProcessInfo processInfo] physicalMemory]; } @@ -152,9 +147,7 @@ static NSUInteger RCTDeviceFreeMemory() { - (CADisplayLink *)displayLink { if (!_displayLink) { - __weak typeof(self) weakSelf = self; - id target = weakProxyEnabled ? [RCTWeakProxy weakProxyWithTarget:self] : weakSelf; - _displayLink = [CADisplayLink displayLinkWithTarget:target selector:@selector(displayDidRefresh:)]; + _displayLink = [CADisplayLink displayLinkWithTarget:[RCTWeakProxy weakProxyWithTarget:self] selector:@selector(displayDidRefresh:)]; NSString *runLoopMode = [NSProcessInfo processInfo].activeProcessorCount > 1 ? NSRunLoopCommonModes : NSDefaultRunLoopMode; [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:runLoopMode]; }