MCPcopy Create free account
hub / github.com/defold/defold / ClearNodes

Function ClearNodes

engine/gui/src/gui.cpp:2958–2972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2956 }
2957
2958 void ClearNodes(HScene scene)
2959 {
2960 uint32_t n = scene->m_Nodes.Size();
2961 InternalNode* nodes = scene->m_Nodes.Begin();
2962 for (uint32_t i = 0; i < n; ++i)
2963 {
2964 FreeNodeMemory(scene, &nodes[i]);
2965 }
2966
2967 scene->m_Nodes.SetSize(0);
2968 scene->m_RenderHead = INVALID_INDEX;
2969 scene->m_RenderTail = INVALID_INDEX;
2970 scene->m_NodePool.Clear();
2971 scene->m_Animations.SetSize(0);
2972 }
2973
2974 static Vector4 ApplyAdjustOnReferenceScale(const Vector4& reference_scale, uint32_t adjust_mode)
2975 {

Callers 3

TEST_FFunction · 0.50
CompGuiOnReloadFunction · 0.50
TEST_FFunction · 0.50

Calls 5

FreeNodeMemoryFunction · 0.85
SizeMethod · 0.45
BeginMethod · 0.45
SetSizeMethod · 0.45
ClearMethod · 0.45

Tested by 2

TEST_FFunction · 0.40
TEST_FFunction · 0.40