if (!ht->template) { for (n = 0; n < ht->callbackCount; n++) { CallbackInfo* ci = &ht->callbackInfo[n]; if (ci->dataTemplateDestructionCallbackFunction) ci->dataTemplateDestructionCallbackFunction(ci->handle, 0, ht->dataTemplate); } } else { for (n = 0; n < ht->callbackCount; n++) { CallbackInfo* ci = &ht->callbackInfo[n]; if (ci->templateDestructionCallbackFunction) ci->templateDestructionCallbackFunction(ci->handle, 0, ht->template); }
for (n = 0; n < ht->callbackCount; n++) { CallbackInfo* ci = &ht->callbackInfo[n]; if (ci->dataTemplateDestructionCallbackFunction) ci->dataTemplateDestructionCallbackFunction(ci->handle, 0, ht->dataTemplate);
void destroyHashtable(Hashtable* ht) {	int i;	for (i = 0; i < HASHTABLE_SIZE; i++) if (ht->bucket[i] != NULL) {		HashBucket* bucket = ht->bucket[i];		while (bucket != 0) {			HashBucket* nextBucket = (HashBucket*)bucket->next;			exportBucket(ht, bucket);			destroyBucket(ht, bucket);			bucket = nextBucket;			} 		}	/* Inform Exporter of Data Template destruction */	int n;			if (!ht->template) {		for (n = 0; n < ht->callbackCount; n++) {			CallbackInfo* ci = &ht->callbackInfo[n];			if (ci->dataTemplateDestructionCallbackFunction) ci->dataTemplateDestructionCallbackFunction(ci->handle, 0, ht->dataTemplate);			}		} else {		for (n = 0; n < ht->callbackCount; n++) {			CallbackInfo* ci = &ht->callbackInfo[n];			if (ci->templateDestructionCallbackFunction) ci->templateDestructionCallbackFunction(ci->handle, 0, ht->template);			}		}				free(ht->dataTemplate->fieldInfo);	free(ht->fieldModifier);	free(ht->dataTemplate->dataInfo);	free(ht->dataTemplate->data);	free(ht->dataTemplate);	if (ht->template) free(ht->template);	free(ht);	}