mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-06 22:37:14 +08:00
Summary: @public Having assignment operators for `YGNode` means that existing children on the node assigned to would have to be handled somehow. Deallocating might be incorrect. Ignoring might leak. Here, we `delete` copy assignment, and make move assignment private (it is used in `YGNode::reset()`). Copy and move constructors *can* be implemented. The move constructor has to take ownership of the children, while the copy constructor leaves ownership untouched. Since children are copied lazily during layout, this does not expose true value semantics. We should consider removing the copy constructor, too. Reviewed By: SidharthGuglani Differential Revision: D14241663 fbshipit-source-id: 39ffdb07f1028bfcf2710c0674a06cdebf3bd650