Skip to content

Commit

Permalink
LuaMacro: Force garbage collection on reloading macrofiles
Browse files Browse the repository at this point in the history
(required after the last change in far.Timer behavior)
  • Loading branch information
shmuz committed Jan 21, 2025
1 parent 663920b commit 064cc9f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/luamacro/_globalinfo.lua
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 5 additions & 0 deletions plugins/luamacro/changelog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/luafar/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 861
#define PLUGIN_BUILD 862
2 changes: 2 additions & 0 deletions plugins/luamacro/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 064cc9f

Please sign in to comment.