Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE void U_EXPORT2 ucnvsel_close ( UConverterSelector *  sel  ) 

Closes a selector. If any Enumerations were returned by ucnv_select*, they become invalid. They can be closed before or after calling ucnv_closeSelector, but should never be used after the selector is closed.

See also:
ucnv_selectForString

ucnv_selectForUTF8

Parameters:
sel selector to close
ICU 4.2

Definition at line 225 of file ucnvsel.cpp.

Referenced by ucnvsel_openFromSerialized().

                                       {
  if (!sel) {
    return;
  }
  if (sel->ownEncodingStrings) {
    uprv_free(sel->encodings[0]);
  }
  uprv_free(sel->encodings);
  if (sel->ownPv) {
    uprv_free(sel->pv);
  }
  utrie2_close(sel->trie);
  uprv_free(sel->swapped);
  uprv_free(sel);
}


Generated by  Doxygen 1.6.0   Back to index