MCPcopy Create free account
hub / github.com/axmolengine/axmol / removeAllChildrenWithCleanup

Method removeAllChildrenWithCleanup

core/2d/Node.cpp:1134–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134void 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
1146void Node::resetChild(Node* child, bool cleanup)
1147{ // IMPORTANT:

Callers 3

removeAllChildrenMethod · 0.95
shouldNotLeakMethod · 0.45
reparentSpriteMethod · 0.45

Calls 1

clearMethod · 0.45

Tested by 2

shouldNotLeakMethod · 0.36
reparentSpriteMethod · 0.36