mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Making RCTFabricSurface to hold a RCTSurfacePresenter weakly
Summary: With this change a RCTFabricSurface instance will not longer to hold a `RCTSurfacePresenter`. This change will enforce the guarantee that retaining a `RCTFabricSurface` is not enough for the service to run (something also should retain a `RCTSurfacePresenter`). For now it's a very small fix that should not anything, but this is a crusial part of some changes I am working on (one aspect of which implied calling unregistration in a `RCTFabricSurface`'s destructor). I need to decouple this part to test this change earlier and decouple this part of the complexity from the future diffs. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D24039581 fbshipit-source-id: c289ae057f0cd5b438f0aa9a1eb8577e1e00b39c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
edbe154a30
commit
16afda2282
@@ -24,7 +24,7 @@ using namespace facebook::react;
|
||||
|
||||
@implementation RCTFabricSurface {
|
||||
// Immutable
|
||||
RCTSurfacePresenter *_surfacePresenter;
|
||||
__weak RCTSurfacePresenter *_surfacePresenter;
|
||||
NSString *_moduleName;
|
||||
|
||||
// Protected by the `_mutex`
|
||||
|
||||
Reference in New Issue
Block a user