From 064cc9f8259f5b54509e1e49b681cb23ab74d40f Mon Sep 17 00:00:00 2001 From: Shmuel Zeigerman Date: Tue, 21 Jan 2025 21:33:12 +0200 Subject: [PATCH] LuaMacro: Force garbage collection on reloading macrofiles (required after the last change in far.Timer behavior) --- plugins/luamacro/_globalinfo.lua | 2 +- plugins/luamacro/changelog | 5 +++++ plugins/luamacro/luafar/version.h | 2 +- plugins/luamacro/utils.lua | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/luamacro/_globalinfo.lua b/plugins/luamacro/_globalinfo.lua index b47d2f88b7..e20b2f2bf8 100644 --- a/plugins/luamacro/_globalinfo.lua +++ b/plugins/luamacro/_globalinfo.lua @@ -1,6 +1,6 @@ function export.GetGlobalInfo() return { - Version = { 3, 0, 0, 861 }, + Version = { 3, 0, 0, 862 }, MinFarVersion = { 3, 0, 0, 6380 }, Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"), Title = "LuaMacro", diff --git a/plugins/luamacro/changelog b/plugins/luamacro/changelog index 5f233b2667..c5151febf2 100644 --- a/plugins/luamacro/changelog +++ b/plugins/luamacro/changelog @@ -1,3 +1,8 @@ +shmuel 2025-01-21 21:18:49+02:00 - build 862 + +1. Force garbage collection on reloading macrofiles + (required after build 861). + shmuel 2025-01-19 20:14:03+02:00 - build 861 1. LuaFAR: Timer objects are garbage-collected as any other full userdata. diff --git a/plugins/luamacro/luafar/version.h b/plugins/luamacro/luafar/version.h index 3b27775d4e..ccfb28bac6 100644 --- a/plugins/luamacro/luafar/version.h +++ b/plugins/luamacro/luafar/version.h @@ -1,3 +1,3 @@ #include -#define PLUGIN_BUILD 861 +#define PLUGIN_BUILD 862 diff --git a/plugins/luamacro/utils.lua b/plugins/luamacro/utils.lua index 1b6418866d..267addb8e9 100644 --- a/plugins/luamacro/utils.lua +++ b/plugins/luamacro/utils.lua @@ -753,6 +753,8 @@ local function LoadMacros (unload, paths) end Areas = newAreas + collectgarbage("collect") -- destroy running timers if any + if not unload then LoadCounter = LoadCounter + 1 local DummyFunc = function() end