Example #1
0
void destroy_factoids() {
	factoid_file = fopen("factoids", "w");
	if (factoid_file == NULL) return;

	strmap_iterate(&factoids, write_factoid);
	strmap_destroy(&factoids);
	fclose(factoid_file);
}
Example #2
0
void cfgi_destroy(struct cfgi_t *cih) {
	strmap_destroy(cih->types, cfgi_type_destroy, NULL);
	cfg_parser_destroy(cih->parser);
	free(cih);
}
Example #3
0
static void cfgi_type_destroy(const char *type, void *value, void *ctx) {
	struct cfgi_type_t *cit = (struct cfgi_type_t *) value;
	strmap_destroy(cit->templates, NULL, NULL);
	cfgi_destroy_objects("", (void*) cit, NULL);
	free(cit);
}