Skip to content

Commit

Permalink
Fix reatain cycle RCTPullToRefreshViewComponentView <-> RCTScrollView…
Browse files Browse the repository at this point in the history
…ComponentView

Summary:
Changelog: [iOS][Fixed] - `_scrollViewComponentView` is set to `RCTPullToRefreshViewComponentView's` superview:
```
_scrollViewComponentView = [RCTScrollViewComponentView findScrollViewComponentViewForView:self];
```
It should be safe to make it weak.

Reviewed By: javache

Differential Revision: D36998626

fbshipit-source-id: 2130b743d181e15986cb68636d60507a986968e1
  • Loading branch information
Dmitry Rykun authored and facebook-github-bot committed Jun 9, 2022
1 parent 68e4e91 commit 4e4b9e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ @interface RCTPullToRefreshViewComponentView () <RCTPullToRefreshViewViewProtoco

@implementation RCTPullToRefreshViewComponentView {
UIRefreshControl *_refreshControl;
RCTScrollViewComponentView *_scrollViewComponentView;
RCTScrollViewComponentView *__weak _scrollViewComponentView;
}

- (instancetype)initWithFrame:(CGRect)frame
Expand Down

0 comments on commit 4e4b9e2

Please sign in to comment.