MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / clear

Method clear

modules/gdscript/gdscript_cache.cpp:118–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void GDScriptParserRef::clear() {
119 if (clearing) {
120 return;
121 }
122 clearing = true;
123
124 GDScriptParser *lparser = parser;
125 GDScriptAnalyzer *lanalyzer = analyzer;
126
127 parser = nullptr;
128 analyzer = nullptr;
129 status = EMPTY;
130 result = OK;
131 source_hash = 0;
132
133 clearing = false;
134
135 if (lanalyzer != nullptr) {
136 memdelete(lanalyzer);
137 }
138
139 if (lparser != nullptr) {
140 memdelete(lparser);
141 }
142}
143
144GDScriptParserRef::~GDScriptParserRef() {
145 clear();

Callers 2

raise_statusMethod · 0.45
remove_scriptMethod · 0.45

Calls 3

memdeleteFunction · 0.85
is_validMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected