void aut_stop(void) { if (var_aut_line_array) { acl_array_free(var_aut_line_array, aut_line_free); var_aut_line_array = NULL; } if (__all_callback_fn) { acl_array_free(__all_callback_fn, free_fn_item); __all_callback_fn = NULL; } }
static void main_cache_free(void) { if (cache_pool) { acl_array_free(cache_pool, (void (*)(void*)) http_hdr_req_free); cache_pool = NULL; } }
void acl_xml_cache_free(ACL_XML *xml) { if (xml->node_cache != NULL) { acl_array_free(xml->node_cache, (void (*)(void*)) acl_xml_node_free); xml->node_cache = NULL; xml->max_cache = 0; } }
static void acl_xml_node_free(ACL_XML_NODE *node) { acl_vstring_free(node->ltag); acl_vstring_free(node->rtag); acl_vstring_free(node->text); acl_ring_detach(&node->node); acl_array_free(node->attr_list, (void (*)(void*)) acl_xml_attr_free); if (node->xml->slice) acl_slice_pool_free(__FILE__, __LINE__, node); else acl_myfree(node); }
void acl_xml_cache(ACL_XML *xml, int max_cache) { if (xml->node_cache != NULL) { acl_array_free(xml->node_cache, (void (*)(void*)) acl_xml_node_free); xml->node_cache = NULL; xml->max_cache = 0; } if (max_cache > 0) { xml->node_cache = acl_array_create(max_cache); xml->max_cache = max_cache; } }
int acl_xml_free(ACL_XML *xml) { ACL_RING *next; ACL_XML_NODE *node; int n = 1; while ((next = acl_ring_pop_head(&xml->root->children)) != NULL) { node = acl_ring_to_appl(next, ACL_XML_NODE, node); n += acl_xml_node_delete(node); } acl_xml_node_free(xml->root); xml->node_cnt--; acl_assert(xml->node_cnt == 0); acl_htable_free(xml->id_table, NULL); if (xml->node_cache != NULL) acl_array_free(xml->node_cache, (void (*)(void*)) acl_xml_node_free); if (xml->slice) acl_slice_pool_free(__FILE__, __LINE__, xml); else acl_myfree(xml); return (n); }
static void thread_cache_free(ACL_ARRAY *pool) { if ((unsigned long) acl_pthread_self() != acl_main_thread_self()) acl_array_free(pool, (void (*)(void*)) http_hdr_req_free); }
static void main_cache_free(void) { if (main_cache) acl_array_free(main_cache, (void (*)(void*)) http_hdr_res_free); }
void aut_free_args_list(ACL_ARRAY *a) { if (a == NULL) return; acl_array_free(a, free_arg_item); }