link-grammar-5.8.0/link-grammar/parse/prune.c
/**
 * free all of the hash tables and C_lists
 */
free all of the hash tables and C_lists
free all of the hash tables and C_lists
static void power_table_delete(power_table *pt)
{
	pool_delete(pt->memory_pool);
	for (WordIdx w = 0; w < pt->power_table_size; w++)
	{
		xfree((char *)pt->l_table[w], pt->l_table_size[w] * sizeof (C_list *));
		xfree((char *)pt->r_table[w], pt->r_table_size[w] * sizeof (C_list *));
	}
	xfree(pt->l_table_size, 2 * pt->power_table_size * sizeof(unsigned int));
	xfree(pt->l_table, 2 * pt->power_table_size * sizeof(C_list **));
}
static void power_table_delete ( power_table * pt ) { pool_delete ( pt -> memory_pool ) ; for ( WordIdx w = 0 ; w < pt -> power_table_size ; w ++ ) { xfree ( ( char * ) pt -> l_table [ w ] , pt -> l_table_size [ w ] * sizeof ( C_list * ) ) ; xfree ( ( char * ) pt -> r_table [ w ] , pt -> r_table_size [ w ] * sizeof ( C_list * ) ) ; } xfree ( pt -> l_table_size , 2 * pt -> power_table_size * sizeof ( unsigned int ) ) ; xfree ( pt -> l_table , 2 * pt -> power_table_size * sizeof ( C_list * * ) ) ; }
free all of the hash tables and C_lists
free all of the hash tables and C_lists