Skip to content

Commit

Permalink
Change the reactInstance category method from shared_ptr to `weak…
Browse files Browse the repository at this point in the history
…_ptr` to match the change in `RCTCxxBridge.mm` made in facebook@71a8944. (#250)
  • Loading branch information
tom-un authored Feb 18, 2020
1 parent 622b877 commit 38d91b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion React/Base/RCTBridge+Cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

@interface RCTBridge (Cxx)

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

@end
4 changes: 2 additions & 2 deletions React/Base/RCTBridge+Cxx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

@implementation RCTBridge (Cxx)

- (std::shared_ptr<facebook::react::Instance>)reactInstance {
std::shared_ptr<facebook::react::Instance> instance;
- (std::weak_ptr<facebook::react::Instance>)reactInstance {
std::weak_ptr<facebook::react::Instance> instance;
RCTBridge *batchBridge = [self batchedBridge];
if ([batchBridge isKindOfClass:[RCTCxxBridge class]]) {
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)batchBridge;
Expand Down

0 comments on commit 38d91b7

Please sign in to comment.