| 1132 | } |
| 1133 | |
| 1134 | void Node::removeAllChildrenWithCleanup(bool cleanup) |
| 1135 | { |
| 1136 | // not using detachChild improves speed here |
| 1137 | for (const auto& child : _children) |
| 1138 | { |
| 1139 | resetChild(child, cleanup); |
| 1140 | } |
| 1141 | |
| 1142 | _children.clear(); |
| 1143 | AX_SAFE_DELETE(_childrenIndexer); |
| 1144 | } |
| 1145 | |
| 1146 | void Node::resetChild(Node* child, bool cleanup) |
| 1147 | { // IMPORTANT: |