link-grammar-5.8.0/link-grammar/parse/fast-match.c
/**
 * Free all of the hash tables and Match_nodes
 */
Free all of the hash tables and Match_nodes
Free all of the hash tables and Match_nodes
void free_fast_matcher(Sentence sent, fast_matcher_t *mchxt)
{
	if (NULL == mchxt) return;
	free(mchxt->l_table[0]);
	free(mchxt->match_list);
	lgdebug(6, "Sentence length %zu, match_list_size %zu\n",
	        mchxt->size, mchxt->match_list_size);
	xfree(mchxt->l_table_size, mchxt->size * sizeof(unsigned int));
	xfree(mchxt->l_table, mchxt->size * sizeof(Match_node **));
	xfree(mchxt, sizeof(fast_matcher_t));
}
void free_fast_matcher ( Sentence sent , fast_matcher_t * mchxt ) { if ( NULL == mchxt ) return ; free ( mchxt -> l_table [ 0 ] ) ; free ( mchxt -> match_list ) ; lgdebug ( 6 , " \n " , mchxt -> size , mchxt -> match_list_size ) ; xfree ( mchxt -> l_table_size , mchxt -> size * sizeof ( unsigned int ) ) ; xfree ( mchxt -> l_table , mchxt -> size * sizeof ( Match_node * * ) ) ; xfree ( mchxt , sizeof ( fast_matcher_t ) ) ; }
Free all of the hash tables and Match_nodes
Free all of the hash tables and Match_nodes