| 565 | } |
| 566 | |
| 567 | void Node::removeAllChildren(bool cleanup) { |
| 568 | ARRAY_START(Node, child, _children) { |
| 569 | if (_flags.isOn(Node::Running)) { |
| 570 | child->onExit(); |
| 571 | } |
| 572 | if (cleanup) { |
| 573 | child->cleanup(); |
| 574 | } else { |
| 575 | child->_flags.setOn(Node::InWaitingList); |
| 576 | SharedDirector.addToWaitingList(child); |
| 577 | } |
| 578 | child->_parent = nullptr; |
| 579 | } |
| 580 | ARRAY_END |
| 581 | if (_children) { |
| 582 | _children->clear(); |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | void Node::removeFromParent(bool cleanup) { |
| 587 | if (_parent) { |
no outgoing calls
no test coverage detected