hmmer-3.3/src/fm_general.c
/* Function:  fm_metaDestroy()
 * Synopsis:  Destroy various metadata for the FMindex implementation
 */
fm_metaDestroy()
Synopsis:  Destroy various metadata for the FMindex implementation
fm_metaDestroy () Synopsis : Destroy various metadata for the FMindex implementation
int
fm_metaDestroy(FM_METADATA *meta ) {
  int i;
  if (meta != NULL) {
    for (i=0; i<meta->seq_count; i++) {
      if(meta->seq_data[i].name)   free(meta->seq_data[i].name);
      if(meta->seq_data[i].acc)    free(meta->seq_data[i].acc);
      if(meta->seq_data[i].source) free(meta->seq_data[i].source);
      if(meta->seq_data[i].desc)   free(meta->seq_data[i].desc);
    }
    free(meta->seq_data);
    if (meta->ambig_list) {
      if (meta->ambig_list->ranges) free(meta->ambig_list->ranges);
      free(meta->ambig_list);
    }
    fm_alphabetDestroy(meta);
    free (meta);
  }
  return eslOK;
}
int fm_metaDestroy ( FM_METADATA * meta ) { int i ; if ( meta != NULL ) { for ( i = 0 ; i < meta -> seq_count ; i ++ ) { if ( meta -> seq_data [ i ] . name ) free ( meta -> seq_data [ i ] . name ) ; if ( meta -> seq_data [ i ] . acc ) free ( meta -> seq_data [ i ] . acc ) ; if ( meta -> seq_data [ i ] . source ) free ( meta -> seq_data [ i ] . source ) ; if ( meta -> seq_data [ i ] . desc ) free ( meta -> seq_data [ i ] . desc ) ; } free ( meta -> seq_data ) ; if ( meta -> ambig_list ) { if ( meta -> ambig_list -> ranges ) free ( meta -> ambig_list -> ranges ) ; free ( meta -> ambig_list ) ; } fm_alphabetDestroy ( meta ) ; free ( meta ) ; } return eslOK ; }
Function:  fm_metaDestroy()
 Synopsis:  Destroy various metadata for the FMindex implementation
Function : fm_metaDestroy () Synopsis : Destroy various metadata for the FMindex implementation