MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / removeChild

Method removeChild

Source/Node/Node.cpp:541–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

539}
540
541void Node::removeChild(Node* child, bool cleanup) {
542 AssertIf(child == nullptr, "remove invalid child (nullptr) from node.");
543 AssertIf(child->_parent != this, "can't remove child node from different parent.");
544 if (!_children) {
545 return;
546 }
547 auto childRef = Value::alloc(child);
548 if (_children->remove(childRef.get())) {
549 if (_flags.isOn(Node::Running)) {
550 child->onExit();
551 }
552 if (cleanup) {
553 child->cleanup();
554 } else {
555 child->_flags.setOn(Node::InWaitingList);
556 SharedDirector.addToWaitingList(child);
557 }
558 child->_parent = nullptr;
559 child->autorelease();
560 }
561}
562
563void Node::removeChildByTag(String tag, bool cleanup) {
564 removeChild(getChildByTag(tag), cleanup);

Callers 15

_replaceDisplayMethod · 0.45
removeFromParentMethod · 0.45
node_remove_childFunction · 0.45
fullscreenChangeFunction · 0.45
copyWithFallbackFunction · 0.45
setContainerMethod · 0.45
destroyMethod · 0.45
setZIndexMethod · 0.45
moveToTopMethod · 0.45
moveUpMethod · 0.45
moveDownMethod · 0.45
moveToBottomMethod · 0.45

Calls 9

isOnMethod · 0.80
setOnMethod · 0.80
addToWaitingListMethod · 0.80
autoreleaseMethod · 0.80
removeMethod · 0.65
getMethod · 0.65
allocFunction · 0.50
onExitMethod · 0.45
cleanupMethod · 0.45

Tested by

no test coverage detected