diff --git a/React/Base/RCTBridge+Cxx.h b/React/Base/RCTBridge+Cxx.h index b5118180763bec..106f2c4738d3ca 100644 --- a/React/Base/RCTBridge+Cxx.h +++ b/React/Base/RCTBridge+Cxx.h @@ -12,6 +12,6 @@ @interface RCTBridge (Cxx) -- (std::shared_ptr)reactInstance; +- (std::weak_ptr)reactInstance; @end diff --git a/React/Base/RCTBridge+Cxx.mm b/React/Base/RCTBridge+Cxx.mm index 506042d570252d..2aca130f865e93 100644 --- a/React/Base/RCTBridge+Cxx.mm +++ b/React/Base/RCTBridge+Cxx.mm @@ -13,8 +13,8 @@ @implementation RCTBridge (Cxx) -- (std::shared_ptr)reactInstance { - std::shared_ptr instance; +- (std::weak_ptr)reactInstance { + std::weak_ptr instance; RCTBridge *batchBridge = [self batchedBridge]; if ([batchBridge isKindOfClass:[RCTCxxBridge class]]) { RCTCxxBridge *cxxBridge = (RCTCxxBridge *)batchBridge;