static void set_destroy(void) { ck_hs_destroy(&hs); return; }
void mtev_hash_destroy(mtev_hash_table *h, NoitHashFreeFunc keyfree, NoitHashFreeFunc datafree) { if(!h) return; if(h->u.hs.hf == NULL) { mtevL(mtev_error, "warning: null hashtable in mtev_hash_destroy... initializing\n"); mtev_stacktrace(mtev_error); mtev_hash_init(h); } mtev_hash_delete_all(h, keyfree, datafree); LOCK(h); ck_hs_destroy(&h->u.hs); UNLOCK(h); mtev_hash_destroy_locks(h); free(h->u.locks.locks); }