diff --git a/include/TLuaEngine.h b/include/TLuaEngine.h index de19f13..21db6d2 100644 --- a/include/TLuaEngine.h +++ b/include/TLuaEngine.h @@ -76,7 +76,7 @@ public: }; TLuaEngine(); - ~TLuaEngine() noexcept { + virtual ~TLuaEngine() noexcept { beammp_debug("Lua Engine terminated"); } @@ -198,7 +198,7 @@ private: public: StateThreadData(const std::string& Name, TLuaStateId StateId, TLuaEngine& Engine); StateThreadData(const StateThreadData&) = delete; - ~StateThreadData() noexcept { beammp_debug("\"" + mStateId + "\" destroyed"); } + virtual ~StateThreadData() noexcept { beammp_debug("\"" + mStateId + "\" destroyed"); } [[nodiscard]] std::shared_ptr EnqueueScript(const TLuaChunk& Script); [[nodiscard]] std::shared_ptr EnqueueFunctionCall(const std::string& FunctionName, const std::vector& Args); [[nodiscard]] std::shared_ptr EnqueueFunctionCallFromCustomEvent(const std::string& FunctionName, const std::vector& Args, const std::string& EventName, CallStrategy Strategy);