* @brief Closes and releases the Lua state if one is allocated. */
| 255 | * @brief Closes and releases the Lua state if one is allocated. |
| 256 | */ |
| 257 | void 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. |
nothing calls this directly
no test coverage detected