Always clear reactions when loading.

This removes a minor potential for memory leaks.
develop
Eric Wald 2014-10-16 14:18:50 -06:00
parent d18bd3e2a5
commit 11d65b4f2d
1 changed files with 2 additions and 1 deletions

@ -31,9 +31,10 @@ CenterCol = 38
-- Populate the reaction and stockpile order lists. -- Populate the reaction and stockpile order lists.
-- To be called whenever a world is loaded. -- To be called whenever a world is loaded.
function initialize_world() function initialize_world()
-- Clear old reactions, just in case.
clear_caches()
reaction_list = collect_reactions() reaction_list = collect_reactions()
saved_orders = collect_orders() saved_orders = collect_orders()
jobs_to_create = {}
end end
-- Clear all caches. -- Clear all caches.