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

Method cleanup

Source/Basic/Director.cpp:477–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475}
476
477void Director::cleanup() {
478 if (!_unmanagedNodes.empty()) {
479 for (Node* node : _unmanagedNodes) {
480 node->cleanup();
481 }
482 }
483 _unmanagedNodes.clear();
484 if (!_waitingList.empty()) {
485 for (Node* node : _waitingList) {
486 if (node) {
487 node->cleanup();
488 }
489 }
490 }
491 _waitingList.clear();
492 if (_ui3D) {
493 _ui3D->removeAllChildren();
494 _ui3D->onExit();
495 _ui3D->cleanup();
496 _ui3D = nullptr;
497 _ui3DCamera = nullptr;
498 }
499 if (_ui) {
500 _ui->removeAllChildren();
501 _ui->onExit();
502 _ui->cleanup();
503 _ui = nullptr;
504 _uiCamera = nullptr;
505 }
506 if (_root) {
507 _root->removeAllChildren();
508 _root->onExit();
509 _root->cleanup();
510 _root = nullptr;
511 _entry = nullptr;
512 }
513 if (_postNode) {
514 _postNode->removeAllChildren();
515 _postNode->onExit();
516 _postNode->cleanup();
517 _postNode = nullptr;
518 }
519 Event::handlePostEvents();
520 if (_nvgContext) {
521 nvgDelete(_nvgContext);
522 _nvgContext = nullptr;
523 }
524 _camStack->clear();
525}
526
527void Director::addUnManagedNode(Node* node) {
528 _unmanagedNodes.push_back(node);

Callers

nothing calls this directly

Calls 5

nvgDeleteFunction · 0.85
removeAllChildrenMethod · 0.80
clearMethod · 0.65
emptyMethod · 0.45
onExitMethod · 0.45

Tested by

no test coverage detected