From cbb069d6ba9a8280825043d768d882617cff242d Mon Sep 17 00:00:00 2001 From: Dan Tamas Date: Wed, 22 Feb 2017 14:16:42 +0100 Subject: [PATCH 1/2] Fix #6 Remove observer on dealloc --- ios/RNNativeListview.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/RNNativeListview.m b/ios/RNNativeListview.m index 772281a..1d8345c 100644 --- a/ios/RNNativeListview.m +++ b/ios/RNNativeListview.m @@ -56,6 +56,10 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge { return self; } +- (void)dealloc { + [self removeObserver:self forKeyPath:@"self.numRows"]; +} + -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { [self.tableView reloadData]; } From 9bc5dba400cf8817290783e2a75a0f28532e7ca0 Mon Sep 17 00:00:00 2001 From: Dan Tamas Date: Wed, 22 Feb 2017 14:17:22 +0100 Subject: [PATCH 2/2] Bump to 1.2.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 323a01b..881e81e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-native-listview", - "version": "1.2.2", + "version": "1.2.3", "description": "High-performance native iOS/Android ListView component for React Native", "keywords": [ "react-native"