Cleanup mNativeChildren on react node cleanup.

Differential Revision: D2663443

fb-gh-sync-id: 7e6e7212103b738f6b6f535e54cc8b86e5def685
This commit is contained in:
Krzysztof Magiera
2015-11-17 05:42:12 -08:00
committed by facebook-github-bot-8
parent 0b46a0c13b
commit 337dc7e093
3 changed files with 29 additions and 11 deletions

View File

@@ -90,6 +90,13 @@ public class NativeViewHierarchyOptimizer {
}
}
/**
* Handles native children cleanup when css node is removed from hierarchy
*/
public static void handleRemoveNode(ReactShadowNode node) {
node.removeAllNativeChildren();
}
/**
* Handles an updateView call. If a view transitions from being layout-only to not (or vice-versa)
* this could result in some number of additional createView and manageChildren calls. If the