From 9510e8fbe1936f3728641acce396ffd46de198c0 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sat, 18 Mar 2017 16:59:46 -0400 Subject: [PATCH] This should resolve leaks and shutdown lua issues --- zone/lua_parser.cpp | 4 ++++ zone/net.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/zone/lua_parser.cpp b/zone/lua_parser.cpp index bf384c703..92f0adbea 100644 --- a/zone/lua_parser.cpp +++ b/zone/lua_parser.cpp @@ -228,6 +228,10 @@ LuaParser::LuaParser() { } LuaParser::~LuaParser() { + // valgrind didn't like when we didn't clean these up :P + lua_encounters.clear(); + lua_encounter_events_registered.clear(); + lua_encounters_loaded.clear(); if(L) { lua_close(L); } diff --git a/zone/net.cpp b/zone/net.cpp index 935dace7d..2746595cf 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -560,6 +560,7 @@ int main(int argc, char** argv) { } entity_list.Clear(); + entity_list.RemoveAllEncounters(); // gotta do it manually or rewrite lots of shit :P parse->ClearInterfaces();