diff --git a/lib/ios/RNNComponentView.m b/lib/ios/RNNComponentView.m index 05f362001f3..3521eb9bfdb 100644 --- a/lib/ios/RNNComponentView.m +++ b/lib/ios/RNNComponentView.m @@ -44,6 +44,14 @@ - (void)observeValueForKeyPath:(NSString *)keyPath } } } + +- (void)dealloc { + if (_observeLayerChange) { + [self.subviews.firstObject.subviews.firstObject.layer removeObserver:self + forKeyPath:@"sublayers"]; + } +} + #endif @end