void EXPRESSdestroy( Express model ) { if ( model->u.express->basename ) scl_free( model->u.express->basename ); if ( model->u.express->filename ) scl_free( model->u.express->filename ); scl_free( model->u.express ); SCOPEdestroy( model ); }
void HASHdestroy( Hash_Table table ) { unsigned int i, j; Segment s; Element p, q; if( table != HASH_NULL ) { #if 0 if( table->in_use ) { HASH_in_use( table, "destroy hash table" ); } #endif for( i = 0; i < table->SegmentCount; i++ ) { /* test probably unnecessary */ if( ( s = table->Directory[i] ) != NULL ) { for( j = 0; j < SEGMENT_SIZE; j++ ) { p = s[j]; while( p != NULL ) { q = p->next; HASH_Element_destroy( p ); p = q; } } scl_free( table->Directory[i] ); } } HASH_Table_destroy( table ); # if HASH_STATISTICS && HASH_DEBUG fprintf( stderr, "[hdestroy] Accesses %ld Collisions %ld\n", HashAccesses, HashCollisions ); # endif } }
static void EXPRESS_PATHfree( void ) { LISTdo( EXPRESS_path, dir, Dir * ) scl_free( dir ); LISTod LISTfree( EXPRESS_path ); }