# HG changeset patch # User thib # Date 1217942660 0 # Node ID b6d6c0ffb423315b86a3fca235648484eb5a6d8f # Parent 55b577e5f5b5cf3131f0dad45f1482260624ffe1 Fixed some memory leaks diff --git a/system/file.cc b/system/file.cc --- a/system/file.cc +++ b/system/file.cc @@ -591,6 +591,7 @@ int FILESEARCH::InitRoot(char* root) { dat_dir = root_dir; } else { dat_dir = new DIRFILE(dat_path); + delete[] dat_path; dat_dir->Init(); } searcher[ALL] = dat_dir; diff --git a/system/system_config.cc b/system/system_config.cc --- a/system/system_config.cc +++ b/system/system_config.cc @@ -788,6 +788,10 @@ AyuSysConfig::AyuSysConfig(void) { SetOrigParam("#SCREENSIZE_MOD", 1, 0); /* 0 = 640x480; 1 = 800x600 */ } +AyuSysConfig::~AyuSysConfig(void) { + delete str_config; + delete int_config; +} static int SplitVar(const char* str, int* ret_var, int ret_size) { /* , あるいは ),:( をセパレータとして、-?[0-9]+ の diff --git a/system/system_config.h b/system/system_config.h --- a/system/system_config.h +++ b/system/system_config.h @@ -42,6 +42,7 @@ public: public: AyuSysConfig(void); + ~AyuSysConfig(); bool LoadInitFile(void); /* パラメータを検索する */ /* str なら 1, int なら 2, 見つからないなら 0 */