Reset NodeRegion when a node gets mounted to a View
Summary: Small optimization. Once we mount a Node to a View, its NodeRegion is not used anymore with RCTText being an exception, but it will correct itself automatically upon updateNodeRegion call. This patch allows the dead object to get garbage collected. Reviewed By: ahmedre Differential Revision: D2816331
This commit is contained in:
parent
7075744b94
commit
2fb7ebfb7b
|
@ -263,6 +263,9 @@ import com.facebook.react.uimanager.ViewProps;
|
|||
if (getParent() != null) {
|
||||
invalidate();
|
||||
}
|
||||
|
||||
// reset NodeRegion to allow it getting garbage-collected
|
||||
mNodeRegion = NodeRegion.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue