From c009065e1c877d87624a3e72de6f06259cf745ac Mon Sep 17 00:00:00 2001 From: LaG1924 Date: Sat, 26 Jun 2021 05:34:24 +0500 Subject: Fixed memory leak in lua --- src/Plugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Plugin.cpp b/src/Plugin.cpp index 5134aa6..ce995fc 100644 --- a/src/Plugin.cpp +++ b/src/Plugin.cpp @@ -301,6 +301,7 @@ void PluginSystem::CallOnChangeState(std::string newState) { void PluginSystem::CallOnTick(double deltaTime) { OPTICK_EVENT(); + lua.safe_script("collectgarbage('collect')"); for (Plugin& plugin : plugins) { if (plugin.onTick && plugin.errors < 10) try { -- cgit v1.2.3