From 11d65b4f2d12897d33aa1f1b51697a9cd5a41f2f Mon Sep 17 00:00:00 2001 From: Eric Wald Date: Thu, 16 Oct 2014 14:18:50 -0600 Subject: [PATCH] Always clear reactions when loading. This removes a minor potential for memory leaks. --- plugins/lua/stockflow.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/lua/stockflow.lua b/plugins/lua/stockflow.lua index b0464d52c..36af33583 100644 --- a/plugins/lua/stockflow.lua +++ b/plugins/lua/stockflow.lua @@ -31,9 +31,10 @@ CenterCol = 38 -- Populate the reaction and stockpile order lists. -- To be called whenever a world is loaded. function initialize_world() + -- Clear old reactions, just in case. + clear_caches() reaction_list = collect_reactions() saved_orders = collect_orders() - jobs_to_create = {} end -- Clear all caches.