Avoid cleaning up ReactRootView content when reactContext is destroyed

Summary: This diff avoids deleting all the views of ReactRootView when the ReactContext is destroyed (ONLY FOR FABRIC). In Fabric these views are removed and deleted by the framework when the ReactShadowNode is destroyed.

Reviewed By: shergin

Differential Revision: D10319737

fbshipit-source-id: 2e2d2599006cd8205e0153c18cd75383387ce1df
This commit is contained in:
David Vacca 2018-10-12 18:36:41 -07:00 committed by Facebook Github Bot
parent 5d414665ea
commit 9817f85def

View File

@ -1073,7 +1073,11 @@ public class ReactInstanceManager {
synchronized (mAttachedRootViews) {
for (ReactRootView rootView : mAttachedRootViews) {
rootView.removeAllViews();
if (rootView.getUIManagerType() != FABRIC) {
// All the views created in surfaces that are managed by Fabric, are removed and deleted
// by the Mounting Layer.
rootView.removeAllViews();
}
rootView.setId(View.NO_ID);
}
}