Skip to content

Commit

Permalink
Fix memory leak in RCTSafeAreaView
Browse files Browse the repository at this point in the history
Summary:
According to the retain code collector, RCTSafeAreaView is in a cycle:
-> _bridge -> RCTCxxBridge -> _moduleDataByName -> __NSDictionaryM -> RCTModuleData -> _instance -> RCTUIManager -> _viewRegistry -> __NSDictionaryM -> RCTSafeAreaView
This should break the cycle.

Reviewed By: shergin

Differential Revision: D6213668

fbshipit-source-id: efb9c1dd148b72f66fe4485b81c16cd4c2d18b17
  • Loading branch information
Mehdi Mulani authored and ide committed Nov 4, 2017
1 parent 87e524b commit 9150975
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Views/SafeAreaView/RCTSafeAreaView.m
Expand Up @@ -15,7 +15,7 @@
#import "RCTSafeAreaViewLocalData.h" #import "RCTSafeAreaViewLocalData.h"


@implementation RCTSafeAreaView { @implementation RCTSafeAreaView {
RCTBridge *_bridge; __weak RCTBridge *_bridge;
UIEdgeInsets _currentSafeAreaInsets; UIEdgeInsets _currentSafeAreaInsets;
} }


Expand Down

0 comments on commit 9150975

Please sign in to comment.