Skip to content

Commit

Permalink
Fabric: Fixed memory leak happened between RCTSurfacePresenter and RC…
Browse files Browse the repository at this point in the history
…TBridge

Summary: RCTBridge does not need to retain RCTSurfacePresenter, so we enforce that using `OBJC_ASSOCIATION_ASSIGN`.

Reviewed By: mdvacca

Differential Revision: D15273325

fbshipit-source-id: f223192ff5f781d9e905b004907739a36882bb63
  • Loading branch information
shergin authored and facebook-github-bot committed May 9, 2019
1 parent 4e215b2 commit c60d9f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Fabric/RCTSurfacePresenter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ @implementation RCTBridge (Deprecated)

- (void)setSurfacePresenter:(RCTSurfacePresenter *)surfacePresenter
{
objc_setAssociatedObject(self, @selector(surfacePresenter), surfacePresenter, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
objc_setAssociatedObject(self, @selector(surfacePresenter), surfacePresenter, OBJC_ASSOCIATION_ASSIGN);
}

- (RCTSurfacePresenter *)surfacePresenter
Expand Down

0 comments on commit c60d9f8

Please sign in to comment.