deps/kb_meme/meme-5.0.1/src/object-list.c
/*************************************************************************
 * Free dynamic memory used by a list of objects.
 *************************************************************************/
Free dynamic memory used by a list of objects.
Free dynamic memory used by a list of objects .
void free_object_list
  (OBJECT_LIST_T* a_list)
{
  int i_object;
  if (a_list == NULL) {
    return;
  }
  for (i_object = 0; i_object < a_list->num_objects; i_object++) {
    if (a_list->free_key != NULL) {
      (a_list->free_key)(a_list->objects[i_object].key);
    }
    (a_list->free_object)(a_list->objects[i_object].value);
  }
  myfree(a_list->objects);
  myfree(a_list->objects);
  myfree(a_list);
}
void free_object_list ( OBJECT_LIST_T * a_list ) { int i_object ; if ( a_list == NULL ) { return ; } for ( i_object = 0 ; i_object < a_list -> num_objects ; i_object ++ ) { if ( a_list -> free_key != NULL ) { ( a_list -> free_key ) ( a_list -> objects [ i_object ] . key ) ; } ( a_list -> free_object ) ( a_list -> objects [ i_object ] . value ) ; } myfree ( a_list -> objects ) ; myfree ( a_list -> objects ) ; myfree ( a_list ) ; }
Free dynamic memory used by a list of objects.
Free dynamic memory used by a list of objects .