This should resolve leaks and shutdown lua issues

This commit is contained in:
Michael Cook (mackal) 2017-03-18 16:59:46 -04:00
parent 803da509ce
commit 9510e8fbe1
2 changed files with 5 additions and 0 deletions

View File

@ -228,6 +228,10 @@ LuaParser::LuaParser() {
} }
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) { if(L) {
lua_close(L); lua_close(L);
} }

View File

@ -560,6 +560,7 @@ int main(int argc, char** argv) {
} }
entity_list.Clear(); entity_list.Clear();
entity_list.RemoveAllEncounters(); // gotta do it manually or rewrite lots of shit :P
parse->ClearInterfaces(); parse->ClearInterfaces();