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

Function FreeNodeMemory

engine/gui/src/gui.cpp:657–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655 }
656
657 static void FreeNodeMemory(HScene scene, InternalNode* n)
658 {
659 if (n->m_Node.m_CustomType != 0 && scene->m_DestroyCustomNodeCallback)
660 {
661 scene->m_DestroyCustomNodeCallback(scene->m_CreateCustomNodeCallbackContext, scene, GetNodeHandle(n), n->m_Node.m_CustomType, n->m_Node.m_CustomData);
662 }
663
664 if (n->m_Node.m_RenderConstants && scene->m_DestroyRenderConstantsCallback)
665 {
666 scene->m_DestroyRenderConstantsCallback(n->m_Node.m_RenderConstants);
667 n->m_Node.m_RenderConstants = 0;
668 }
669
670 FreeTextLayout(&n->m_Node.m_TextLayout);
671
672 free((void*)n->m_Node.m_Text);
673 n->m_Node.m_Text = 0;
674
675 free(n->m_Node.m_ResetPointProperties);
676 n->m_Node.m_ResetPointProperties = 0;
677 }
678
679 void DeleteScene(HScene scene)
680 {

Callers 3

DeleteSceneFunction · 0.85
DeleteNodeFunction · 0.85
ClearNodesFunction · 0.85

Calls 3

FreeTextLayoutFunction · 0.85
freeFunction · 0.85
GetNodeHandleFunction · 0.70

Tested by

no test coverage detected