mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 22:42:13 +08:00
Cleanup native view hierarchy when view is dropped.
Differential Revision: D2659738 fb-gh-sync-id: 1c14b8c3c6fabbd0e580777bb94221df6dd98f71
This commit is contained in:
committed by
facebook-github-bot-7
parent
0f590d1233
commit
bd1885b5d4
@@ -406,9 +406,10 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
private void removeCSSNode(int tag) {
|
||||
ReactShadowNode node = mShadowNodeRegistry.getNode(tag);
|
||||
mShadowNodeRegistry.removeNode(tag);
|
||||
for (int i = 0;i < node.getChildCount(); i++) {
|
||||
for (int i = node.getChildCount() - 1; i >= 0; i--) {
|
||||
removeCSSNode(node.getChildAt(i).getReactTag());
|
||||
}
|
||||
node.removeAllChildren();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user