[ReactNative] Remove bridge retaining cycles

This commit is contained in:
Tadeu Zagallo
2015-04-10 07:28:10 -07:00
parent 4616037428
commit f5f80da80c
7 changed files with 110 additions and 59 deletions

View File

@@ -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];