Fix a few memory leaks

- Rewrite zonename_array to use std::map rather than a pointer to an array
of character pointers

- Properly delete ZoneConfig on Zone shutdown

- Delete AdventureTemplates in AdventureManager destructor
This commit is contained in:
j883376
2013-06-21 17:09:46 -04:00
parent e811e3975b
commit 76e25f75fa
4 changed files with 20 additions and 63 deletions
+2 -1
View File
@@ -72,7 +72,7 @@
#undef new
#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
#endif
#ifdef _WINDOWS
#include <conio.h>
#include <process.h>
@@ -475,6 +475,7 @@ int main(int argc, char** argv) {
#endif
safe_delete(ps);
safe_delete(mmf);
safe_delete(Config);
if (zone != 0)
Zone::Shutdown(true);