mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Recycle only views created by RN
Summary: This diff ensure that only views created by RN are taken into consideration for recycling. Reviewed By: fkgozali Differential Revision: D14874678 fbshipit-source-id: ea7dd5a0f29f6acf0dce8573fc77b012395476bd
This commit is contained in:
committed by
Facebook Github Bot
parent
66492e7f9b
commit
40590348ea
@@ -94,8 +94,11 @@ public class MountingManager {
|
||||
|
||||
mTagToViewState.remove(reactTag);
|
||||
Context context = view.getContext();
|
||||
mViewFactory.recycle(
|
||||
(ThemedReactContext) context, Assertions.assertNotNull(viewManager).getName(), view);
|
||||
if (context instanceof ThemedReactContext) {
|
||||
// We only recycle views that were created by RN (its context is instance of ThemedReactContext)
|
||||
mViewFactory.recycle(
|
||||
(ThemedReactContext) context, Assertions.assertNotNull(viewManager).getName(), view);
|
||||
}
|
||||
}
|
||||
|
||||
/** Releases all references to react root tag. */
|
||||
|
||||
Reference in New Issue
Block a user