Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 6e642b68c -> 4c8c819ef
* [ios] unload view when component is valid Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/4c8c819e Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/4c8c819e Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/4c8c819e Branch: refs/heads/0.16-dev Commit: 4c8c819ef9aa870dda98483ca46abe6c70f53458 Parents: 6e642b6 Author: acton393 <zhangxing610...@gmail.com> Authored: Thu Sep 7 20:11:42 2017 +0800 Committer: acton393 <zhangxing610...@gmail.com> Committed: Thu Sep 7 20:11:42 2017 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/4c8c819e/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m index 55784b3..147dae9 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m +++ b/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m @@ -595,7 +595,9 @@ static css_node_t * rootNodeGetChild(void *context, int i) WXComponent *component; while ((component = [enumerator nextObject])) { dispatch_async(dispatch_get_main_queue(), ^{ - [component _unloadViewWithReusing:NO]; + if ([self isValid]) { + [component _unloadViewWithReusing:NO]; + } }); }