Skip to content

Commit 8dbcb2d

Browse files
yogevbdYogev Ben David
and
Yogev Ben David
committedMar 9, 2021
Remove yellowBox observer on dealloc (wix#7015)
This PR fixes a crash caused by a KVO observer that isn't cleared. Closes wix#7009 Co-authored-by: Yogev Ben David <yogevbd@wixs-MacBook-Pro.local>
1 parent f86299a commit 8dbcb2d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎lib/ios/RNNComponentView.m

+8
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
4444
}
4545
}
4646
}
47+
48+
- (void)dealloc {
49+
if (_observeLayerChange) {
50+
[self.subviews.firstObject.subviews.firstObject.layer removeObserver:self
51+
forKeyPath:@"sublayers"];
52+
}
53+
}
54+
4755
#endif
4856

4957
@end

0 commit comments

Comments
 (0)
Failed to load comments.