src/config/config.cc
/*
 * Deletes the dictionary and all of its elements.
 */
Deletes the dictionary and all of its elements.
Deletes the dictionary and all of its elements .
Config::~Config(void) {
  for (size_t i = 0; i < DICT_SIZE; i++) {
    DictElem *elem = dict_[i];
    DictElem *next_elem;
    while (elem != NULL) {
      next_elem = elem->next;
      delete[] elem->key;
      delete[] elem->val;
      delete elem;
      elem = next_elem;
    }
  }
  delete[] dict_;
  delete[] default_config_;
  return;
}
Config :: ~ Config ( void ) { for ( size_t i = 0 ; i < DICT_SIZE ; i ++ ) { DictElem * elem = dict_ [ i ] ; DictElem * next_elem ; while ( elem != NULL ) { next_elem = elem -> next ; delete [ ] elem -> key ; delete [ ] elem -> val ; delete elem ; elem = next_elem ; } } delete [ ] dict_ ; delete [ ] default_config_ ; return ; }
Deletes the dictionary and all of its elements.
Deletes the dictionary and all of its elements .
// Delete each list of elements. // Delete the dict itself and the default folder path string.