Skip to content

Commit 7c603ee

Browse files
zeyapmeta-codesync[bot]
authored andcommitted
Invalidate displayLink & deallocate RCTAnimatedModuleProvider before ReactHost teardown (#54712)
Summary: Pull Request resolved: #54712 ## Changelog: [iOS] [Added] - Allow invalidateDisplayLink on RCTAnimatedModuleProvider Reviewed By: sammy-SC Differential Revision: D87929762 fbshipit-source-id: 116661a96154cdf108e7c1a6e7f09f49275529b7
1 parent 5e95f18 commit 7c603ee

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class TurboModule;
1919

2020
@interface RCTAnimatedModuleProvider : NSObject
2121

22+
- (void)invalidate;
23+
2224
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
2325
jsInvoker:
2426
(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker;

packages/react-native/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ @implementation RCTAnimatedModuleProvider {
2929
}
3030

3131
- (void)dealloc
32+
{
33+
[self invalidate];
34+
}
35+
36+
- (void)invalidate
3237
{
3338
if (_displayLink != nil) {
3439
#if TARGET_OS_OSX

0 commit comments

Comments
 (0)