def matrix_config_free(config): for section in ["network", "look", "color", "server"]: section_pointer = W.config_search_section(config, section) W.config_section_free_options(section_pointer) W.config_section_free(section_pointer) W.config_free(config)
def free(self): """Free all the config sections and their options as well as the configuration file. Should be called when the script is unloaded.""" for section in [ getattr(self, a) for a in dir(self) if isinstance(getattr(self, a), ConfigSection) ]: section.free() W.config_free(self._ptr)