ad65b2a9e1
Summary: There is currently a bug where we never release any Views that no longer display, still storing hard references in NativeViewHierarchyManager. This diff is fixing this bug, and here is how: a) there is already logic in place to drop FlatShadowNodes (UIImplementation.removeShadowNode). b) there is already logic in place to drop Views (NativeViewHierarchyManager.dropView(int reactTag) - used to private but needs to be protected so I can call it) c) (the missing part) when we are about to drop a FlatShadowNode, check if it mount to a View (i.e. there is a View associated with that node), put it into a ArrayList. When we finished updates to a nodes hierarchy (which happens in non-UI thread), collect ids from those nodes and enqueue a UIOperation that will drop all the Views. We can either forward nodes as FlatShadowNode[], or only ids as int[]. Both should be fine, but as a rule of thumb we don't touch shadow node hierarchy from UI thread (as we don't touch Views from non-UI thread) so passing int[] is what this code is doing. Reviewed By: ahmedre Differential Revision: D2757310 |
||
---|---|---|
.. | ||
libs | ||
src | ||
.npmignore | ||
DEFS | ||
DevExperience.md | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
release.gradle |
README.md
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.