symboltable.c
/* release the memory occupied by the symbol table */
release the memory occupied by the symbol table
release the memory occupied by the symbol table
void free_symbol_table(symbol_table st)
{
	symbol_table_internal *symbol_table_p = reveal(st);
	int num_entries = symbol_table_p->num_entries;
	int i;
	for (i=0; i<num_entries; i++)
	{
		free(symbol_table_p->sym[i].name);
		free(symbol_table_p->sym[i].value);
	}
	free(symbol_table_p->sym);
	free(symbol_table_p);
}
void free_symbol_table ( symbol_table st ) { symbol_table_internal * symbol_table_p = reveal ( st ) ; int num_entries = symbol_table_p -> num_entries ; int i ; for ( i = 0 ; i < num_entries ; i ++ ) { free ( symbol_table_p -> sym [ i ] . name ) ; free ( symbol_table_p -> sym [ i ] . value ) ; } free ( symbol_table_p -> sym ) ; free ( symbol_table_p ) ; }
release the memory occupied by the symbol table
release the memory occupied by the symbol table