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

Method destroyLua

app/src/MQTT/PublisherScript.cpp:257–263  ·  view source on GitHub ↗

* @brief Closes and releases the Lua state if one is allocated. */

Source from the content-addressed store, hash-verified

255 * @brief Closes and releases the Lua state if one is allocated.
256 */
257void MQTT::PublisherScript::destroyLua()
258{
259 if (m_luaState) {
260 lua_close(m_luaState);
261 m_luaState = nullptr;
262 }
263}
264
265/**
266 * @brief Drops the cached JS function reference and runs GC on the engine.

Callers

nothing calls this directly

Calls 1

lua_closeFunction · 0.85

Tested by

no test coverage detected