diff --git a/src/misc/setup.cpp b/src/misc/setup.cpp index 33c14ed9..eadee807 100644 --- a/src/misc/setup.cpp +++ b/src/misc/setup.cpp @@ -196,10 +196,19 @@ Section_line* Config::AddSection_line(const char* _name,void (*_initfunction)(Se void Config::Init(){ for (it tel=sectionlist.begin(); tel!=sectionlist.end(); tel++){ + LOG_DEBUG("Init %s",(*tel)->sectionname.c_str()); (*tel)->ExecuteInit(); } } +Config::~Config() { + reverse_it cnt=sectionlist.rbegin(); + while (cnt!=sectionlist.rend()) { + delete (*cnt); + cnt++; + } +} + Section* Config::GetSection(const char* _sectionname){ for (it tel=sectionlist.begin(); tel!=sectionlist.end(); tel++){ if ( (*tel)->sectionname==_sectionname) return (*tel); @@ -248,9 +257,6 @@ void Config::StartUp(void) { (*_start_function)(); } - - - bool CommandLine::FindExist(char * name,bool remove) { cmd_it it; if (!(FindEntry(name,it,false))) return false;