Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 943

icu-doc-58.2-3.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ICU 58.2: uclean.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 58.2
   &#160;<span id="projectnumber">58.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li><li class="navelem"><a class="el" href="dir_30087b5439e04c85304dbcf15650710b.html">common</a></li><li class="navelem"><a class="el" href="dir_8bf9c54ed6ca2fd1e2117fb037e4ad06.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">uclean.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: Initialize and clean up ICU.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br />
</div>
<p><a href="uclean_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a7a7b058f29daf7fcac9a5c27584b1710"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a7a7b058f29daf7fcac9a5c27584b1710">UMemAllocFn</a>(const void *context, size_t size)</td></tr>
<tr class="memdesc:a7a7b058f29daf7fcac9a5c27584b1710"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer type for a user supplied memory allocation function.  <a href="#a7a7b058f29daf7fcac9a5c27584b1710">More...</a><br /></td></tr>
<tr class="separator:a7a7b058f29daf7fcac9a5c27584b1710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b6b46b156cc0874de4c1f9ae202e6e7"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a1b6b46b156cc0874de4c1f9ae202e6e7">UMemReallocFn</a>(const void *context, void *mem, size_t size)</td></tr>
<tr class="memdesc:a1b6b46b156cc0874de4c1f9ae202e6e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer type for a user supplied memory re-allocation function.  <a href="#a1b6b46b156cc0874de4c1f9ae202e6e7">More...</a><br /></td></tr>
<tr class="separator:a1b6b46b156cc0874de4c1f9ae202e6e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ef0908b72449d65c915e6c3d173886a"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a0ef0908b72449d65c915e6c3d173886a">UMemFreeFn</a>(const void *context, void *mem)</td></tr>
<tr class="memdesc:a0ef0908b72449d65c915e6c3d173886a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer type for a user supplied memory free function.  <a href="#a0ef0908b72449d65c915e6c3d173886a">More...</a><br /></td></tr>
<tr class="separator:a0ef0908b72449d65c915e6c3d173886a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af125d56147c708c2d8ecc5327449c41d"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#af125d56147c708c2d8ecc5327449c41d">UMTX</a></td></tr>
<tr class="memdesc:af125d56147c708c2d8ecc5327449c41d"><td class="mdescLeft">&#160;</td><td class="mdescRight">An opaque pointer type that represents an ICU mutex.  <a href="#af125d56147c708c2d8ecc5327449c41d">More...</a><br /></td></tr>
<tr class="separator:af125d56147c708c2d8ecc5327449c41d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a302ac3ea859a593dea50f9a1b06ce5b1"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a302ac3ea859a593dea50f9a1b06ce5b1">UMtxInitFn</a>(const void *context, <a class="el" href="uclean_8h.html#af125d56147c708c2d8ecc5327449c41d">UMTX</a> *mutex, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a302ac3ea859a593dea50f9a1b06ce5b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function Pointer type for a user supplied mutex initialization function.  <a href="#a302ac3ea859a593dea50f9a1b06ce5b1">More...</a><br /></td></tr>
<tr class="separator:a302ac3ea859a593dea50f9a1b06ce5b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67a2314f542b9f495ef0b2ac1cfd5192"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a>(const void *context, <a class="el" href="uclean_8h.html#af125d56147c708c2d8ecc5327449c41d">UMTX</a> *mutex)</td></tr>
<tr class="memdesc:a67a2314f542b9f495ef0b2ac1cfd5192"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function Pointer type for a user supplied mutex functions.  <a href="#a67a2314f542b9f495ef0b2ac1cfd5192">More...</a><br /></td></tr>
<tr class="separator:a67a2314f542b9f495ef0b2ac1cfd5192"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21713ef0c8987c243f315dab6db8e2b8"><td class="memItemLeft" align="right" valign="top">typedef int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a21713ef0c8987c243f315dab6db8e2b8">UMtxAtomicFn</a>(const void *context, int32_t *p)</td></tr>
<tr class="memdesc:a21713ef0c8987c243f315dab6db8e2b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer type for a user supplied atomic increment or decrement function.  <a href="#a21713ef0c8987c243f315dab6db8e2b8">More...</a><br /></td></tr>
<tr class="separator:a21713ef0c8987c243f315dab6db8e2b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab6a4215b45b2162889aa1ff01e491d4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c">u_init</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ab6a4215b45b2162889aa1ff01e491d4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize ICU.  <a href="#ab6a4215b45b2162889aa1ff01e491d4c">More...</a><br /></td></tr>
<tr class="separator:ab6a4215b45b2162889aa1ff01e491d4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93f27d0ddc7c196a1da864763f2d8920"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920">u_cleanup</a> (void)</td></tr>
<tr class="memdesc:a93f27d0ddc7c196a1da864763f2d8920"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clean up the system resources, such as allocated memory or open files, used in all ICU libraries.  <a href="#a93f27d0ddc7c196a1da864763f2d8920">More...</a><br /></td></tr>
<tr class="separator:a93f27d0ddc7c196a1da864763f2d8920"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dea766c5e726833400dc0ee24a2bc6a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a5dea766c5e726833400dc0ee24a2bc6a">u_setMemoryFunctions</a> (const void *context, <a class="el" href="uclean_8h.html#a7a7b058f29daf7fcac9a5c27584b1710">UMemAllocFn</a> *a, <a class="el" href="uclean_8h.html#a1b6b46b156cc0874de4c1f9ae202e6e7">UMemReallocFn</a> *r, <a class="el" href="uclean_8h.html#a0ef0908b72449d65c915e6c3d173886a">UMemFreeFn</a> *f, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a5dea766c5e726833400dc0ee24a2bc6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the functions that ICU will use for memory allocation.  <a href="#a5dea766c5e726833400dc0ee24a2bc6a">More...</a><br /></td></tr>
<tr class="separator:a5dea766c5e726833400dc0ee24a2bc6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad286bdc5cbaf91e6b6e8f9c565455ec0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#ad286bdc5cbaf91e6b6e8f9c565455ec0">u_setMutexFunctions</a> (const void *context, <a class="el" href="uclean_8h.html#a302ac3ea859a593dea50f9a1b06ce5b1">UMtxInitFn</a> *init, <a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a> *destroy, <a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a> *lock, <a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a> *unlock, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:ad286bdc5cbaf91e6b6e8f9c565455ec0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the functions that ICU will use for mutex operations Use of this function is optional; by default (without this function), ICU will directly access system functions for mutex operations This function can only be used when ICU is in an initial, unused state, before <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> has been called.  <a href="#ad286bdc5cbaf91e6b6e8f9c565455ec0">More...</a><br /></td></tr>
<tr class="separator:ad286bdc5cbaf91e6b6e8f9c565455ec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a677b75b566af2a41202e255262ff38c3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a677b75b566af2a41202e255262ff38c3">u_setAtomicIncDecFunctions</a> (const void *context, <a class="el" href="uclean_8h.html#a21713ef0c8987c243f315dab6db8e2b8">UMtxAtomicFn</a> *inc, <a class="el" href="uclean_8h.html#a21713ef0c8987c243f315dab6db8e2b8">UMtxAtomicFn</a> *dec, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a677b75b566af2a41202e255262ff38c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the functions that ICU will use for atomic increment and decrement of int32_t values.  <a href="#a677b75b566af2a41202e255262ff38c3">More...</a><br /></td></tr>
<tr class="separator:a677b75b566af2a41202e255262ff38c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>C API: Initialize and clean up ICU. </p>

<p>Definition in file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a7a7b058f29daf7fcac9a5c27584b1710"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* UMemAllocFn(const void *context, size_t size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer type for a user supplied memory allocation function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#a5dea766c5e726833400dc0ee24a2bc6a" title="Set the functions that ICU will use for memory allocation. ">u_setMemoryFunctions()</a>. </td></tr>
    <tr><td class="paramname">size</td><td>The number of bytes to be allocated </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the newly allocated memory, or NULL if the allocation failed. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001462">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000004">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00113">113</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<a class="anchor" id="a0ef0908b72449d65c915e6c3d173886a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void UMemFreeFn(const void *context, void *mem)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer type for a user supplied memory free function. </p>
<p>Behavior should be similar the standard C library free(). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#a5dea766c5e726833400dc0ee24a2bc6a" title="Set the functions that ICU will use for memory allocation. ">u_setMemoryFunctions()</a>. </td></tr>
    <tr><td class="paramname">mem</td><td>Pointer to the memory block to be resized </td></tr>
    <tr><td class="paramname">size</td><td>The new size for the block </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the resized memory block, or NULL if the resizing failed. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001464">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000006">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00133">133</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1b6b46b156cc0874de4c1f9ae202e6e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* UMemReallocFn(const void *context, void *mem, size_t size)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer type for a user supplied memory re-allocation function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#a5dea766c5e726833400dc0ee24a2bc6a" title="Set the functions that ICU will use for memory allocation. ">u_setMemoryFunctions()</a>. </td></tr>
    <tr><td class="paramname">size</td><td>The number of bytes to be allocated </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the newly allocated memory, or NULL if the allocation failed. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001463">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000005">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00122">122</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<a class="anchor" id="af125d56147c708c2d8ecc5327449c41d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* <a class="el" href="uclean_8h.html#af125d56147c708c2d8ecc5327449c41d">UMTX</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>An opaque pointer type that represents an ICU mutex. </p>
<p>For user-implemented mutexes, the value will typically point to a struct or object that implements the mutex. </p><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000075">Deprecated:</a></b></dt><dd>ICU 52. This type is no longer supported. </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000008">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00173">173</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<a class="anchor" id="a21713ef0c8987c243f315dab6db8e2b8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int32_t UMtxAtomicFn(const void *context, int32_t *p)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Pointer type for a user supplied atomic increment or decrement function. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#a677b75b566af2a41202e255262ff38c3" title="Set the functions that ICU will use for atomic increment and decrement of int32_t values...">u_setAtomicIncDecFunctions()</a>. </td></tr>
    <tr><td class="paramname">p</td><td>Pointer to a 32 bit int to be incremented or decremented </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the variable after the inc or dec operation. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000079">Deprecated:</a></b></dt><dd>ICU 52. This function is no longer supported. </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000012">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00236">236</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<a class="anchor" id="a67a2314f542b9f495ef0b2ac1cfd5192"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void UMtxFn(const void *context, <a class="el" href="uclean_8h.html#af125d56147c708c2d8ecc5327449c41d">UMTX</a> *mutex)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function Pointer type for a user supplied mutex functions. </p>
<p>One of the user-supplied functions with this signature will be called by ICU whenever ICU needs to lock, unlock, or destroy a mutex. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#ad286bdc5cbaf91e6b6e8f9c565455ec0" title="Set the functions that ICU will use for mutex operations Use of this function is optional; by default...">u_setMutexFunctions()</a>. </td></tr>
    <tr><td class="paramname">mutex</td><td>specify the mutex on which to operate. </td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000077">Deprecated:</a></b></dt><dd>ICU 52. This function is no longer supported. </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000010">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00203">203</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<a class="anchor" id="a302ac3ea859a593dea50f9a1b06ce5b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void UMtxInitFn(const void *context, <a class="el" href="uclean_8h.html#af125d56147c708c2d8ecc5327449c41d">UMTX</a> *mutex, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function Pointer type for a user supplied mutex initialization function. </p>
<p>The user-supplied function will be called by ICU whenever ICU needs to create a new mutex. The function implementation should create a mutex, and store a pointer to something that uniquely identifies the mutex into the UMTX that is supplied as a paramter. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#ad286bdc5cbaf91e6b6e8f9c565455ec0" title="Set the functions that ICU will use for mutex operations Use of this function is optional; by default...">u_setMutexFunctions()</a>. </td></tr>
    <tr><td class="paramname">mutex</td><td>Receives a pointer that identifies the new mutex. The mutex init function must set the UMTX to a non-null value. Subsequent calls by ICU to lock, unlock, or destroy a mutex will identify the mutex by the UMTX value. </td></tr>
    <tr><td class="paramname">status</td><td>Error status. Report errors back to ICU by setting this variable with an error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000076">Deprecated:</a></b></dt><dd>ICU 52. This function is no longer supported. </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000009">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

<p>Definition at line <a class="el" href="uclean_8h_source.html#l00191">191</a> of file <a class="el" href="uclean_8h_source.html">uclean.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a93f27d0ddc7c196a1da864763f2d8920"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_cleanup </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clean up the system resources, such as allocated memory or open files, used in all ICU libraries. </p>
<p>This will free/delete all memory owned by the ICU libraries, and return them to their original load state. All open ICU items (collators, resource bundles, converters, etc.) must be closed before calling this function, otherwise ICU may not free its allocated memory (e.g. close your converters and resource bundles before calling this function). Generally, this function should be called once just before an application exits. For applications that dynamically load and unload the ICU libraries (relatively uncommon), <a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a> should be called just before the library unload. </p>
<p><a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a> also clears any ICU heap functions, mutex functions or trace functions that may have been set for the process. This has the effect of restoring ICU to its initial condition, before any of these override functions were installed. Refer to <a class="el" href="uclean_8h.html#a5dea766c5e726833400dc0ee24a2bc6a" title="Set the functions that ICU will use for memory allocation. ">u_setMemoryFunctions()</a>, u_setMutexFunctions and <a class="el" href="utrace_8h.html#aa87ea156afa4807f0a3db73d85c66551" title="Set ICU Tracing functions. ">utrace_setFunctions()</a>. If ICU is to be reinitialized after after calling <a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a>, these runtime override functions will need to be set up again if they are still required. </p>
<p><a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a> is not thread safe. All other threads should stop using ICU before calling this function. </p>
<p>Any open ICU items will be left in an undefined state by <a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a>, and any subsequent attempt to use such an item will give unpredictable results. </p>
<p>After calling <a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a>, an application may continue to use ICU by calling <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a>. An application must invoke <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> first from one single thread before allowing other threads call <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a>. All threads existing at the time of the first thread's call to <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> must also call <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> themselves before continuing with other ICU operations. </p>
<p>The use of <a class="el" href="uclean_8h.html#a93f27d0ddc7c196a1da864763f2d8920" title="Clean up the system resources, such as allocated memory or open files, used in all ICU libraries...">u_cleanup()</a> just before an application terminates is optional, but it should be called only once for performance reasons. The primary benefit is to eliminate reports of memory or resource leaks originating in ICU code from the results generated by heap analysis tools. </p>
<p><b>Use this function with great care!</b> </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001461">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000003">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

</div>
</div>
<a class="anchor" id="ab6a4215b45b2162889aa1ff01e491d4c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize ICU. </p>
<p>Use of this function is optional. It is OK to simply use ICU services and functions without first having initialized ICU by calling <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a>.</p>
<p><a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> will attempt to load some part of ICU's data, and is useful as a test for configuration or installation problems that leave the ICU data inaccessible. A successful invocation of <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> does not, however, guarantee that all ICU data is accessible.</p>
<p>Multiple calls to <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> cause no harm, aside from the small amount of time required.</p>
<p>In old versions of ICU, <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> was required in multi-threaded applications to ensure the thread safety of ICU. <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> is no longer needed for this purpose.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>An ICU UErrorCode parameter. It must not be <code>NULL</code>. An Error will be returned if some required part of ICU data can not be loaded or initialized. The function returns immediately if the input error code indicates a failure, as usual.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001460">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a677b75b566af2a41202e255262ff38c3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setAtomicIncDecFunctions </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a21713ef0c8987c243f315dab6db8e2b8">UMtxAtomicFn</a> *&#160;</td>
          <td class="paramname"><em>inc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a21713ef0c8987c243f315dab6db8e2b8">UMtxAtomicFn</a> *&#160;</td>
          <td class="paramname"><em>dec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the functions that ICU will use for atomic increment and decrement of int32_t values. </p>
<p>Use of this function is optional; by default (without this function), ICU will use its own internal implementation of atomic increment/decrement. This function can only be used when ICU is in an initial, unused state, before <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> has been called. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>This pointer value will be saved, and then (later) passed as a parameter to the increment and decrement functions each time they are called. This function can only be called </td></tr>
    <tr><td class="paramname">inc</td><td>Pointer to a function to do an atomic increment operation. Must be non-null. </td></tr>
    <tr><td class="paramname">dec</td><td>Pointer to a function to do an atomic decrement operation. Must be non-null. </td></tr>
    <tr><td class="paramname">status</td><td>Receives error values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000080">Deprecated:</a></b></dt><dd>ICU 52. This function is no longer supported. </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000013">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

</div>
</div>
<a class="anchor" id="a5dea766c5e726833400dc0ee24a2bc6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setMemoryFunctions </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a7a7b058f29daf7fcac9a5c27584b1710">UMemAllocFn</a> *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a1b6b46b156cc0874de4c1f9ae202e6e7">UMemReallocFn</a> *&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a0ef0908b72449d65c915e6c3d173886a">UMemFreeFn</a> *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the functions that ICU will use for memory allocation. </p>
<p>Use of this function is optional; by default (without this function), ICU will use the standard C library malloc() and free() functions. This function can only be used when ICU is in an initial, unused state, before <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> has been called. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>This pointer value will be saved, and then (later) passed as a parameter to the memory functions each time they are called. </td></tr>
    <tr><td class="paramname">a</td><td>Pointer to a user-supplied malloc function. </td></tr>
    <tr><td class="paramname">r</td><td>Pointer to a user-supplied realloc function. </td></tr>
    <tr><td class="paramname">f</td><td>Pointer to a user-supplied free function. </td></tr>
    <tr><td class="paramname">status</td><td>Receives error values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001465">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000007">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

</div>
</div>
<a class="anchor" id="ad286bdc5cbaf91e6b6e8f9c565455ec0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setMutexFunctions </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a302ac3ea859a593dea50f9a1b06ce5b1">UMtxInitFn</a> *&#160;</td>
          <td class="paramname"><em>init</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a> *&#160;</td>
          <td class="paramname"><em>destroy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a> *&#160;</td>
          <td class="paramname"><em>lock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uclean_8h.html#a67a2314f542b9f495ef0b2ac1cfd5192">UMtxFn</a> *&#160;</td>
          <td class="paramname"><em>unlock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the functions that ICU will use for mutex operations Use of this function is optional; by default (without this function), ICU will directly access system functions for mutex operations This function can only be used when ICU is in an initial, unused state, before <a class="el" href="uclean_8h.html#ab6a4215b45b2162889aa1ff01e491d4c" title="Initialize ICU. ">u_init()</a> has been called. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">context</td><td>This pointer value will be saved, and then (later) passed as a parameter to the user-supplied mutex functions each time they are called. </td></tr>
    <tr><td class="paramname">init</td><td>Pointer to a mutex initialization function. Must be non-null. </td></tr>
    <tr><td class="paramname">destroy</td><td>Pointer to the mutex destroy function. Must be non-null. </td></tr>
    <tr><td class="paramname">lock</td><td>pointer to the mutex lock function. Must be non-null. </td></tr>
    <tr><td class="paramname">unlock</td><td>Pointer to the mutex unlock function. Must be non-null. </td></tr>
    <tr><td class="paramname">status</td><td>Receives error values. </td></tr>
  </table>
  </dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000078">Deprecated:</a></b></dt><dd>ICU 52. This function is no longer supported. </dd></dl>
<dl class="system"><dt><b><a class="el" href="system.html#_system000011">System:</a></b></dt><dd>Do not use unless you know what you are doing. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>