Fabric: Cleaning up Shadow Tree on surface unregistering
Summary: As it mentioned in the comment, we have to commit an empty tree as part of cleaning up Surface. Reviewed By: mdvacca Differential Revision: D9931320 fbshipit-source-id: 04e780bafdb917adeb89f2edef2dc0348b2a4d4a
This commit is contained in:
parent
55e168980f
commit
031037f491
|
@ -54,6 +54,8 @@ void Scheduler::unregisterRootTag(Tag rootTag) {
|
|||
const auto &iterator = shadowTreeRegistry_.find(rootTag);
|
||||
const auto &shadowTree = iterator->second;
|
||||
assert(shadowTree);
|
||||
// As part of stopping the Surface, we have to commit an empty tree.
|
||||
shadowTree->complete(std::const_pointer_cast<SharedShadowNodeList>(ShadowNode::emptySharedShadowNodeSharedList()));
|
||||
shadowTree->setDelegate(nullptr);
|
||||
shadowTreeRegistry_.erase(iterator);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue