diff --git a/framework/ios/base/HippyDisplayLink.m b/framework/ios/base/HippyDisplayLink.m index c4be3f76b8e..991d18a2e69 100644 --- a/framework/ios/base/HippyDisplayLink.m +++ b/framework/ios/base/HippyDisplayLink.m @@ -23,12 +23,13 @@ #import "HippyDisplayLink.h" #import -#import +#import #import "HippyAssert.h" #import "HippyBridgeModule.h" #import "HippyFrameUpdate.h" #import "HippyModuleData.h" +#import "HippyWeakProxy.h" #define HippyAssertRunLoop() HippyAssert(_runLoop == [NSRunLoop currentRunLoop], @"This method must be called on the CADisplayLink run loop") @@ -41,7 +42,8 @@ @implementation HippyDisplayLink { - (instancetype)init { if ((self = [super init])) { _frameUpdateObservers = [NSMutableSet new]; - _jsDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(_jsThreadUpdate:)]; + HippyWeakProxy *weakProxy = [HippyWeakProxy weakProxyForObject:self]; + _jsDisplayLink = [CADisplayLink displayLinkWithTarget:weakProxy selector:@selector(_jsThreadUpdate:)]; } return self;