mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
[ReactNative] Remove bridge retaining cycles
This commit is contained in:
@@ -177,7 +177,7 @@ static UIViewAnimationCurve UIViewAnimationCurveFromRCTAnimationType(RCTAnimatio
|
||||
|
||||
@implementation RCTUIManager
|
||||
{
|
||||
dispatch_queue_t _shadowQueue;
|
||||
__weak dispatch_queue_t _shadowQueue;
|
||||
|
||||
// Root views are only mutated on the shadow queue
|
||||
NSMutableSet *_rootViewTags;
|
||||
@@ -322,7 +322,6 @@ static NSString *RCTViewNameForModuleName(NSString *moduleName)
|
||||
|
||||
// Register shadow view
|
||||
dispatch_async(_shadowQueue, ^{
|
||||
|
||||
RCTShadowView *shadowView = [[RCTShadowView alloc] init];
|
||||
shadowView.reactTag = reactTag;
|
||||
shadowView.frame = frame;
|
||||
@@ -921,11 +920,9 @@ static void RCTMeasureLayout(RCTShadowView *view,
|
||||
RCTResponseSenderBlock callback)
|
||||
{
|
||||
if (!view) {
|
||||
RCTLogError(@"Attempting to measure view that does not exist");
|
||||
return;
|
||||
}
|
||||
if (!ancestor) {
|
||||
RCTLogError(@"Attempting to measure relative to ancestor that does not exist");
|
||||
return;
|
||||
}
|
||||
CGRect result = [view measureLayoutRelativeToAncestor:ancestor];
|
||||
|
||||
Reference in New Issue
Block a user