mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Fix memory leak that occurs when removing root nodes
Reviewed By: sriramramani Differential Revision: D4540427 fbshipit-source-id: 8bdc0d2318371315b95300cdc6ca10bd0dbb55dd
This commit is contained in:
committed by
Facebook Github Bot
parent
5dc64b40a5
commit
d768309367
@@ -133,10 +133,17 @@ public class UIImplementation {
|
||||
* Unregisters a root node with a given tag.
|
||||
*/
|
||||
public void removeRootView(int rootViewTag) {
|
||||
mShadowNodeRegistry.removeRootNode(rootViewTag);
|
||||
removeRootShadowNode(rootViewTag);
|
||||
mOperationsQueue.enqueueRemoveRootView(rootViewTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters a root node with a given tag from the shadow node registry
|
||||
*/
|
||||
public void removeRootShadowNode(int rootViewTag) {
|
||||
mShadowNodeRegistry.removeRootNode(rootViewTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when native view that corresponds to a root node, or acts as a root view (ie. Modals)
|
||||
* has its size changed.
|
||||
|
||||
Reference in New Issue
Block a user