Files
react-native/ReactAndroid/src/main/java/com/facebook/react/flat
Denis KoroskinandAhmed El-Helw ada5234b0e Lazily create/update views
Summary:
There is a rare case in React Native when a hierarchy is created and then *immediately* discarded all in one transaction. This is causing a View leak, because a View is created and then never attached to a hierarchy because it shadow node got detached. Since we never attached the View to the hierarchy, we cannot do a detach either and the View is kept in NativeViewHierarchyManager forever, causing a View leak. To fix the issue, don't create a backing View whenever a shadow node mounts to a View. Instead, put the create request into a queue and ONLY execute it if a shadow node is still attached to a hierarchy. This is fixing the View leak because will not create a View unless it's going to be attached somewhere.

The same logic applies to View style update (we don't want to update a View that is going to be detached from a hierarchy).

Reviewed By: ahmedre

Differential Revision: D2916826
2016-12-19 13:40:22 -08:00
..
2016-12-19 13:40:21 -08:00
2016-12-19 13:40:17 -08:00
2016-12-19 13:40:22 -08:00
2016-12-19 13:40:17 -08:00