13
0

Remove redundant collectgarbage() calls from scripts

Since 8112d6472e garbage is automatically collected
after running a Lua GUI script.
This commit is contained in:
Robin Gareus 2020-03-10 23:31:20 +01:00
parent f921b4790f
commit 925be49b2d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
19 changed files with 2 additions and 50 deletions

View File

@ -88,8 +88,4 @@ function factory () return function ()
if (rv) then
print (serialize ("dialog", rv))
end
od = nil
collectgarbage ()
end end

View File

@ -73,5 +73,4 @@ function factory () return function ()
lc[1].min, lc[1].max, pcl.min, pcl.max, bcl.min, bcl.max))
end
end
collectgarbage ()
end end

View File

@ -30,8 +30,5 @@ function factory ()
-- unset most recently used filename on dialog "cancel"
file_name_testscript_last_filename = nil
end
od = nil
collectgarbage ()
end
end

View File

@ -77,5 +77,4 @@ function factory (p) return function ()
end
i = i + 1
end
collectgarbage () -- drop references to tracks.
end end

View File

@ -158,10 +158,6 @@ function factory () return function ()
else
Session:abort_reversible_command ()
end
-- clean up, unload vamp plugin
vamp = nil
collectgarbage ()
end end

View File

@ -29,8 +29,4 @@ function factory () return function ()
t:set_presentation_order(pos)
pos = pos + 1
end
-- drop all track references
tracklist = nil
collectgarbage ()
end end

View File

@ -5,6 +5,5 @@ function factory () return function ()
ARDOUR.config():set_use_monitor_bus (true)
else
ARDOUR.config():set_use_monitor_bus (false)
collectgarbage ()
end
end end

View File

@ -105,8 +105,6 @@ function factory () return function ()
end
::out::
rv = nil
collectgarbage ()
end end
function icon (params) return function (ctx, width, height, fg)

View File

@ -61,8 +61,4 @@ function factory () return function ()
::out::
-- hide modal progress dialog and destroy it
pdialog:done ();
pdialog = nil
vamp = nil;
collectgarbage ()
end end

View File

@ -65,9 +65,5 @@ function factory () return function ()
else
LuaDialog.Message ("VCA Slave Example", "Recursive VCA assignment ignored", LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run ()
end
-- drop references
mst = nil slv = nil
collectgarbage ()
end end
:nd end

View File

@ -65,7 +65,6 @@ function factory (unused_params)
LuaDialog.Message("Add LFO automation to region", "No plugin parameters found.",
LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run()
region, track, targets = nil, nil, nil
collectgarbage()
return
end
@ -85,7 +84,6 @@ function factory (unused_params)
-- Return if the user cancelled
if not rv then
region, track, targets = nil, nil, nil
collectgarbage()
return
end
@ -171,7 +169,6 @@ function factory (unused_params)
Session:commit_reversible_command(nil)
region, al, lut = nil, nil, nil
collectgarbage()
end
end

View File

@ -42,9 +42,4 @@ function factory () return function ()
end
LuaDialog.Message ("All Plugins", "<span face=\"mono\">" .. rv .. "</span>", LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run()
all_plugs = nil
rv = ""
collectgarbage ();
end end

View File

@ -44,8 +44,6 @@ function factory () return function ()
-- bail out if there are no parameters
if not have_entries then
LuaDialog.Message ("CC to Plugin Automation", "No Plugins found", LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run ()
targets = nil
collectgarbage ()
return
end
@ -117,7 +115,6 @@ function factory () return function ()
Session:abort_reversible_command ()
LuaDialog.Message ("CC to Plugin Automation", "No data was converted. Was a MIDI-region with CC-automation selected? ", LuaDialog.MessageType.Info, LuaDialog.ButtonType.Close):run ()
end
collectgarbage ()
end end
function icon (params) return function (ctx, width, height, fg)

View File

@ -20,7 +20,6 @@ function factory () return function ()
end
ArdourUI.mixer_screenshot (rv['file'])
end
collectgarbage ()
end end
function icon (params) return function (ctx, width, height, fg)

View File

@ -12,6 +12,4 @@ function factory () return function ()
local rtav = Editor:rtav_from_route(r) -- lookup RTAV
Editor:new_playlists(rtav:to_timeaxisview())
end
collectgarbage()
end end

View File

@ -245,5 +245,4 @@ function factory() return function()
end
end
::pass_script::
collectgarbage()
end end
end end

View File

@ -571,5 +571,4 @@ function factory() return function()
end
end
end
collectgarbage()
end end

View File

@ -96,5 +96,4 @@ function factory () return function ()
end
end
::script_end::
collectgarbage()
end end

View File

@ -97,9 +97,6 @@ function factory () return function ()
::out::
pdialog:done ();
pdialog = nil
vamp = nil;
collectgarbage ()
end end
function icon (params) return function (ctx, width, height, fg)