Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 386

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: uclean.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<h1>uclean.h File Reference</h1>C API: Initialize and clean up ICU. <a href="#_details">More...</a>
<p>
<code>#include &quot;<a class="el" href="utypes_8h-source.html">unicode/utypes.h</a>&quot;</code><br>

<p>
<a href="uclean_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#e6e6dfb0e66c4d64f5e814ce7cffac57">UMTX</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An opaque pointer type that represents an ICU mutex.  <a href="#e6e6dfb0e66c4d64f5e814ce7cffac57"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#1a91edd87e42a95ce8beca18fb3b8a29">UMtxInitFn</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#e6e6dfb0e66c4d64f5e814ce7cffac57">UMTX</a> *mutex, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function Pointer type for a user supplied mutex initialization function.  <a href="#1a91edd87e42a95ce8beca18fb3b8a29"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#e6e6dfb0e66c4d64f5e814ce7cffac57">UMTX</a> *mutex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Function Pointer type for a user supplied mutex functions.  <a href="#96bc87a9b5b55a247ae42b2cbef631fe"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#ee5c7acdfbbb8fefffcd3aa3332a3f34">UMtxAtomicFn</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer type for a user supplied atomic increment or decrement function.  <a href="#ee5c7acdfbbb8fefffcd3aa3332a3f34"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void *U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#60aad393593599619d59cdd2c12fc697">UMemAllocFn</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, size_t size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer type for a user supplied memory allocation function.  <a href="#60aad393593599619d59cdd2c12fc697"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void *U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#a25d9aa9ec27b16fcb3910a2f013b9e9">UMemReallocFn</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, void *mem, size_t size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer type for a user supplied memory re-allocation function.  <a href="#a25d9aa9ec27b16fcb3910a2f013b9e9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void U_CALLCONV&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#8a5022dc87a7891e2c78ca0a73774bbc">UMemFreeFn</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, void *mem)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer type for a user supplied memory free function.  <a href="#8a5022dc87a7891e2c78ca0a73774bbc"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init</a> (<a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize ICU.  <a href="#d3c023068378725023389083c21c102b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">u_cleanup</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clean up the system resources, such as allocated memory or open files, used in all ICU libraries.  <a href="#d77ac06b8705d66c45ea4f9713a9270f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#52d2a1d172043a51860b5da12631469b">u_setMutexFunctions</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#1a91edd87e42a95ce8beca18fb3b8a29">UMtxInitFn</a> *init, <a class="el" href="uclean_8h.html#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> *destroy, <a class="el" href="uclean_8h.html#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> *lock, <a class="el" href="uclean_8h.html#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> *unlock, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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#d3c023068378725023389083c21c102b">u_init()</a> has been called.  <a href="#52d2a1d172043a51860b5da12631469b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#064ca3ac38dc1bbf962ada7521262523">u_setAtomicIncDecFunctions</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#ee5c7acdfbbb8fefffcd3aa3332a3f34">UMtxAtomicFn</a> *inc, <a class="el" href="uclean_8h.html#ee5c7acdfbbb8fefffcd3aa3332a3f34">UMtxAtomicFn</a> *dec, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the functions that ICU will use for atomic increment and decrement of int32_t values.  <a href="#064ca3ac38dc1bbf962ada7521262523"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="uclean_8h.html#c7315b6000306dc185f3be1000be66ba">u_setMemoryFunctions</a> (const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#60aad393593599619d59cdd2c12fc697">UMemAllocFn</a> *a, <a class="el" href="uclean_8h.html#a25d9aa9ec27b16fcb3910a2f013b9e9">UMemReallocFn</a> *r, <a class="el" href="uclean_8h.html#8a5022dc87a7891e2c78ca0a73774bbc">UMemFreeFn</a> *f, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the functions that ICU will use for memory allocation.  <a href="#c7315b6000306dc185f3be1000be66ba"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
C API: Initialize and clean up ICU. 
<p>

<p>
Definition in file <a class="el" href="uclean_8h-source.html">uclean.h</a>.<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="60aad393593599619d59cdd2c12fc697"></a><!-- doxytag: member="uclean.h::UMemAllocFn" ref="60aad393593599619d59cdd2c12fc697" args="(const void *context, size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* U_CALLCONV <a class="el" href="uclean_8h.html#60aad393593599619d59cdd2c12fc697">UMemAllocFn</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, size_t size)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer type for a user supplied memory allocation function. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#c7315b6000306dc185f3be1000be66ba">u_setMemoryFunctions()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The number of bytes to be allocated </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Pointer to the newly allocated memory, or NULL if the allocation failed. </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000017">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000017">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#l00225">225</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<a class="anchor" name="8a5022dc87a7891e2c78ca0a73774bbc"></a><!-- doxytag: member="uclean.h::UMemFreeFn" ref="8a5022dc87a7891e2c78ca0a73774bbc" args="(const void *context, void *mem)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void U_CALLCONV <a class="el" href="uclean_8h.html#8a5022dc87a7891e2c78ca0a73774bbc">UMemFreeFn</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, void *mem)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer type for a user supplied memory free function. 
<p>
Behavior should be similar the standard C library free(). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#c7315b6000306dc185f3be1000be66ba">u_setMemoryFunctions()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mem</em>&nbsp;</td><td>Pointer to the memory block to be resized </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The new size for the block </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Pointer to the resized memory block, or NULL if the resizing failed. </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000021">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000021">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#l00245">245</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<a class="anchor" name="a25d9aa9ec27b16fcb3910a2f013b9e9"></a><!-- doxytag: member="uclean.h::UMemReallocFn" ref="a25d9aa9ec27b16fcb3910a2f013b9e9" args="(const void *context, void *mem, size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* U_CALLCONV <a class="el" href="uclean_8h.html#a25d9aa9ec27b16fcb3910a2f013b9e9">UMemReallocFn</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, 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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#c7315b6000306dc185f3be1000be66ba">u_setMemoryFunctions()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>The number of bytes to be allocated </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Pointer to the newly allocated memory, or NULL if the allocation failed. </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000019">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000019">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#l00234">234</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<a class="anchor" name="e6e6dfb0e66c4d64f5e814ce7cffac57"></a><!-- doxytag: member="uclean.h::UMTX" ref="e6e6dfb0e66c4d64f5e814ce7cffac57" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* <a class="el" href="uclean_8h.html#e6e6dfb0e66c4d64f5e814ce7cffac57">UMTX</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
An opaque pointer type that represents an ICU mutex. 
<p>
For user-implemented mutexes, the value will typically point to a struct or object that implements the mutex. <dl compact><dt><b><a class="el" href="system.html#_system000005">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><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#l00129">129</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<a class="anchor" name="ee5c7acdfbbb8fefffcd3aa3332a3f34"></a><!-- doxytag: member="uclean.h::UMtxAtomicFn" ref="ee5c7acdfbbb8fefffcd3aa3332a3f34" args="(const void *context, int32_t *p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> U_CALLCONV <a class="el" href="uclean_8h.html#ee5c7acdfbbb8fefffcd3aa3332a3f34">UMtxAtomicFn</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *p)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer type for a user supplied atomic increment or decrement function. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#064ca3ac38dc1bbf962ada7521262523">u_setAtomicIncDecFunctions()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p</em>&nbsp;</td><td>Pointer to a 32 bit int to be incremented or decremented </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The value of the variable after the inc or dec operation. </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000013">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><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>

<p>
Definition at line <a class="el" href="uclean_8h-source.html#l00194">194</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<a class="anchor" name="96bc87a9b5b55a247ae42b2cbef631fe"></a><!-- doxytag: member="uclean.h::UMtxFn" ref="96bc87a9b5b55a247ae42b2cbef631fe" args="(const void *context, UMTX *mutex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void U_CALLCONV <a class="el" href="uclean_8h.html#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#e6e6dfb0e66c4d64f5e814ce7cffac57">UMTX</a> *mutex)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function Pointer type for a user supplied mutex functions. 
<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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#52d2a1d172043a51860b5da12631469b">u_setMutexFunctions()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mutex</em>&nbsp;</td><td>specify the mutex on which to operate. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="system.html#_system000009">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><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#l00159">159</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<a class="anchor" name="1a91edd87e42a95ce8beca18fb3b8a29"></a><!-- doxytag: member="uclean.h::UMtxInitFn" ref="1a91edd87e42a95ce8beca18fb3b8a29" args="(const void *context, UMTX *mutex, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void U_CALLCONV <a class="el" href="uclean_8h.html#1a91edd87e42a95ce8beca18fb3b8a29">UMtxInitFn</a>(const void *<a class="el" href="ustring_8h.html#64dc1cf03a0a74fd8fb861d74185e16e">context</a>, <a class="el" href="uclean_8h.html#e6e6dfb0e66c4d64f5e814ce7cffac57">UMTX</a> *mutex, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Function Pointer type for a user supplied mutex initialization function. 
<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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>user supplied value, obtained from from <a class="el" href="uclean_8h.html#52d2a1d172043a51860b5da12631469b">u_setMutexFunctions()</a>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mutex</em>&nbsp;</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 valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Error status. Report errors back to ICU by setting this variable with an error code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="system.html#_system000007">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><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>

<p>
Definition at line <a class="el" href="uclean_8h-source.html#l00147">147</a> of file <a class="el" href="uclean_8h-source.html">uclean.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="d77ac06b8705d66c45ea4f9713a9270f"></a><!-- doxytag: member="uclean.h::u_cleanup" ref="d77ac06b8705d66c45ea4f9713a9270f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_cleanup           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></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>
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#d77ac06b8705d66c45ea4f9713a9270f">u_cleanup()</a> should be called just before the library unload. <p>
<a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">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#c7315b6000306dc185f3be1000be66ba">u_setMemoryFunctions()</a>, u_setMutexFunctions and <a class="el" href="utrace_8h.html#66badad621ce3c961b217d5e9c2204e3">utrace_setFunctions()</a>. If ICU is to be reinitialized after after calling <a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">u_cleanup()</a>, these runtime override functions will need to be set up again if they are still required. <p>
<a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">u_cleanup()</a> is not thread safe. All other threads should stop using ICU before calling this function. <p>
Any open ICU items will be left in an undefined state by <a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">u_cleanup()</a>, and any subsequent attempt to use such an item will give unpredictable results. <p>
After calling <a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">u_cleanup()</a>, an application may continue to use ICU by calling <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a>. An application must invoke <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> first from one single thread before allowing other threads call <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a>. All threads existing at the time of the first thread's call to <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> must also call <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> themselves before continuing with other ICU operations. <p>
The use of <a class="el" href="uclean_8h.html#d77ac06b8705d66c45ea4f9713a9270f">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>
<b>Use this function with great care!</b> <p>
<dl compact><dt><b><a class="el" href="system.html#_system000003">System:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl compact><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><p>
<a class="anchor" name="d3c023068378725023389083c21c102b"></a><!-- doxytag: member="uclean.h::u_init" ref="d3c023068378725023389083c21c102b" args="(UErrorCode *status)" -->
<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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialize ICU. 
<p>
The description further below applies to ICU 2.6 to ICU 3.4. Starting with ICU 3.4, <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> needs not be called any more for ensuring thread safety, but it can give an indication for whether ICU can load its data. In ICU 3.4, it will try to load the converter alias table (cnvalias.icu) and give an error code if that fails. This may change in the future. <p>
For ensuring the availability of necessary data, an application should open the service objects (converters, collators, etc.) that it will use and check for error codes there. <p>
Documentation for ICU 2.6 to ICU 3.4: <p>
This function loads and initializes data items that are required internally by various ICU functions. Use of this explicit initialization is required in multi-threaded applications; in single threaded apps, use is optional, but incurs little additional cost, and is thus recommended. <p>
In multi-threaded applications, <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> should be called in the main thread before starting additional threads, or, alternatively it can be called in each individual thread once, before other ICU functions are called in that thread. In this second scenario, the application must guarantee that the first call to <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> happen without contention, in a single thread only. <p>
If <code><a class="el" href="uclean_8h.html#c7315b6000306dc185f3be1000be66ba">u_setMemoryFunctions()</a></code> or <code>u_setMutexFunctions</code> are needed (uncommon), they must be called _before_ <code><a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a></code>. <p>
Extra, repeated, or otherwise unneeded calls to <a class="el" href="uclean_8h.html#d3c023068378725023389083c21c102b">u_init()</a> do no harm, other than taking a small amount of time.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</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>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000839">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="064ca3ac38dc1bbf962ada7521262523"></a><!-- doxytag: member="uclean.h::u_setAtomicIncDecFunctions" ref="064ca3ac38dc1bbf962ada7521262523" args="(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setAtomicIncDecFunctions           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</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#ee5c7acdfbbb8fefffcd3aa3332a3f34">UMtxAtomicFn</a> *&nbsp;</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#ee5c7acdfbbb8fefffcd3aa3332a3f34">UMtxAtomicFn</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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>
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#d3c023068378725023389083c21c102b">u_init()</a> has been called. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</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 valign="top"></td><td valign="top"><em>inc</em>&nbsp;</td><td>Pointer to a function to do an atomic increment operation. Must be non-null. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dec</em>&nbsp;</td><td>Pointer to a function to do an atomic decrement operation. Must be non-null. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Receives error values. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="system.html#_system000015">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000015">System:</a></b></dt><dd>Do not use unless you know what you are doing.  </dd></dl>

</div>
</div><p>
<a class="anchor" name="c7315b6000306dc185f3be1000be66ba"></a><!-- doxytag: member="uclean.h::u_setMemoryFunctions" ref="c7315b6000306dc185f3be1000be66ba" args="(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setMemoryFunctions           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</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#60aad393593599619d59cdd2c12fc697">UMemAllocFn</a> *&nbsp;</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#a25d9aa9ec27b16fcb3910a2f013b9e9">UMemReallocFn</a> *&nbsp;</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#8a5022dc87a7891e2c78ca0a73774bbc">UMemFreeFn</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the functions that ICU will use for memory allocation. 
<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#d3c023068378725023389083c21c102b">u_init()</a> has been called. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</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 valign="top"></td><td valign="top"><em>a</em>&nbsp;</td><td>Pointer to a user-supplied malloc function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>r</em>&nbsp;</td><td>Pointer to a user-supplied realloc function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>f</em>&nbsp;</td><td>Pointer to a user-supplied free function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Receives error values. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="system.html#_system000023">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><dt><b><a class="el" href="system.html#_system000023">System:</a></b></dt><dd>Do not use unless you know what you are doing.  </dd></dl>

</div>
</div><p>
<a class="anchor" name="52d2a1d172043a51860b5da12631469b"></a><!-- doxytag: member="uclean.h::u_setMutexFunctions" ref="52d2a1d172043a51860b5da12631469b" args="(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_setMutexFunctions           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</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#1a91edd87e42a95ce8beca18fb3b8a29">UMtxInitFn</a> *&nbsp;</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#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> *&nbsp;</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#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> *&nbsp;</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#96bc87a9b5b55a247ae42b2cbef631fe">UMtxFn</a> *&nbsp;</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#863c11989634c998849cc946d04dfabe">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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#d3c023068378725023389083c21c102b">u_init()</a> has been called. 
<p>
This function may be used even when ICU has been built without multi-threaded support (see ICU_USE_THREADS pre-processor variable, umutex.h) <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</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 valign="top"></td><td valign="top"><em>init</em>&nbsp;</td><td>Pointer to a mutex initialization function. Must be non-null. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destroy</em>&nbsp;</td><td>Pointer to the mutex destroy function. Must be non-null. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>lock</em>&nbsp;</td><td>pointer to the mutex lock function. Must be non-null. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>unlock</em>&nbsp;</td><td>Pointer to the mutex unlock function. Must be non-null. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Receives error values. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="system.html#_system000011">System:</a></b></dt><dd>ICU 2.8 </dd></dl>
<dl compact><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><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:52 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>