Example #1
0
void destroy() {
	hashmap_foreach(b.plugins, __unload_plugin);

	hashmap_destroy(b.plugins);
	hashmap_destroy(b.handlers);
	hashmap_destroy(b.commands);

	for (int i = 0; i < b.channels->index; ++i) {
		free(b.channels->list[i]);
	}
	VEC_DESTROY(b.channels);
	cJSON_Delete(b.config);
}
Example #2
0
void free_metric(void)
{
  long i;

  for (i = 0; i < n; i++) {
    if (visited[i]) {
      VEC_DESTROY(*ancestors[i]);
      free(ancestors[i]);
    }
  }
  free(ancestors);
  free(depth);
  free(visited);
  free_graph(&gi);
}