diff --git a/packages/react-native-reanimated/apple/reanimated/apple/Fabric/REAInitializerRCTFabricSurface.h b/packages/react-native-reanimated/apple/reanimated/apple/Fabric/REAInitializerRCTFabricSurface.h index bd8143b8a55..c27c2106790 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/Fabric/REAInitializerRCTFabricSurface.h +++ b/packages/react-native-reanimated/apple/reanimated/apple/Fabric/REAInitializerRCTFabricSurface.h @@ -5,7 +5,7 @@ @interface REAInitializerRCTFabricSurface : RCTFabricSurface -@property REAModule *reaModule; +@property __weak REAModule *reaModule; @end diff --git a/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm b/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm index 5ee5b74c4f7..9b48d8557f2 100644 --- a/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm +++ b/packages/react-native-reanimated/apple/reanimated/apple/REAModule.mm @@ -193,9 +193,10 @@ - (void)setBridge:(RCTBridge *)bridge - (void)setReaSurfacePresenter { - if (reaSurface == nil) { - // we need only one instance because SurfacePresenter is the same during the application lifetime - reaSurface = [[REAInitializerRCTFabricSurface alloc] init]; + if (_surfacePresenter && ![_surfacePresenter surfaceForRootTag:reaSurface.rootTag]) { + if (!reaSurface) { + reaSurface = [[REAInitializerRCTFabricSurface alloc] init]; + } [_surfacePresenter registerSurface:reaSurface]; } reaSurface.reaModule = self;