MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / destroyState

Method destroyState

app/src/DataModel/Scripting/LuaScriptEngine.cpp:192–202  ·  view source on GitHub ↗

* @brief Closes the Lua state and resets internal flags. */

Source from the content-addressed store, hash-verified

190 * @brief Closes the Lua state and resets internal flags.
191 */
192void DataModel::LuaScriptEngine::destroyState()
193{
194 if (m_state) {
195 DataModel::FrameBuilder::instance().tableStore().clearLookupCache();
196 lua_close(m_state);
197 m_state = nullptr;
198 }
199
200 m_loaded = false;
201 m_deadline = QDeadlineTimer(QDeadlineTimer::Forever);
202}
203
204/**
205 * @brief Returns true once a parse() function has been loaded into the Lua state.

Callers

nothing calls this directly

Calls 2

lua_closeFunction · 0.85
clearLookupCacheMethod · 0.80

Tested by

no test coverage detected