From 5ca8b6dc30970df6ef8e70efa0cd4a0d4af3d355 Mon Sep 17 00:00:00 2001 From: Kevin Lin Date: Tue, 5 Nov 2019 09:56:47 -0800 Subject: [PATCH] Make `rootNode` a weak reference in `SKComponentLayoutWrapper` Summary: In some cases this can cause a retain cycle. Reviewed By: priteshrnandgaonkar Differential Revision: D18297780 fbshipit-source-id: c60abdcaad9fd94c457647509aec0519042801e4 --- .../SKComponentLayoutWrapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h index f3658e757..27cee84ca 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.h @@ -19,7 +19,7 @@ @property (nonatomic, readonly) CGSize size; @property (nonatomic, readonly) CGPoint position; @property (nonatomic, readonly) std::vector children; -@property (nonatomic, readonly) id rootNode; +@property (nonatomic, weak, readonly) id rootNode; // Null for layouts which are not direct children of a CKFlexboxComponent @property (nonatomic, readonly) BOOL isFlexboxChild; @property (nonatomic, readonly) CKFlexboxComponentChild flexboxChild;