Skip to content

Commit 38d91b7

Browse files
authored
Change the reactInstance category method from shared_ptr to weak_ptr to match the change in RCTCxxBridge.mm made in facebook@71a8944. (#250)
1 parent 622b877 commit 38d91b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

React/Base/RCTBridge+Cxx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212

1313
@interface RCTBridge (Cxx)
1414

15-
- (std::shared_ptr<facebook::react::Instance>)reactInstance;
15+
- (std::weak_ptr<facebook::react::Instance>)reactInstance;
1616

1717
@end

React/Base/RCTBridge+Cxx.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
@implementation RCTBridge (Cxx)
1515

16-
- (std::shared_ptr<facebook::react::Instance>)reactInstance {
17-
std::shared_ptr<facebook::react::Instance> instance;
16+
- (std::weak_ptr<facebook::react::Instance>)reactInstance {
17+
std::weak_ptr<facebook::react::Instance> instance;
1818
RCTBridge *batchBridge = [self batchedBridge];
1919
if ([batchBridge isKindOfClass:[RCTCxxBridge class]]) {
2020
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)batchBridge;

0 commit comments

Comments
 (0)