ICU-10295 ucleanup experiments.

X-SVN-Rev: 34587
This commit is contained in:
Andy Heninger 2013-10-19 01:26:53 +00:00
parent 2fcbf4c898
commit 604f679894
4 changed files with 13 additions and 4 deletions

View file

@ -277,7 +277,7 @@ static icu::ICULocaleService* gService = NULL;
* Release all static memory held by breakiterator.
*/
U_CDECL_BEGIN
static UBool U_CALLCONV breakiterator_cleanup(void) {
UBool U_CALLCONV breakiterator_cleanup(void) {
#if !UCONFIG_NO_SERVICE
if (gService) {
delete gService;

View file

@ -32,7 +32,7 @@ static UChar SECOND_PARAMETER[] = { 0x7b, 0x31, 0x7d }; // "{0}"
static const char *STANDARD_STYLE = "standard";
U_CDECL_BEGIN
static UBool U_CALLCONV uprv_listformatter_cleanup() {
UBool U_CALLCONV uprv_listformatter_cleanup() {
delete listPatternHash;
listPatternHash = NULL;
return TRUE;

View file

@ -39,7 +39,7 @@ U_NAMESPACE_END
U_CDECL_BEGIN
static UBool U_CALLCONV locale_available_cleanup(void)
UBool U_CALLCONV locale_available_cleanup(void)
{
U_NAMESPACE_USE
@ -104,7 +104,7 @@ static icu::UInitOnce _installedLocalesInitOnce;
/* ### Get available **************************************************/
static UBool U_CALLCONV uloc_cleanup(void) {
UBool U_CALLCONV uloc_cleanup(void) {
char ** temp;
if (_installedLocales) {

View file

@ -83,6 +83,15 @@ ucln_registerCleanup(ECleanupLibraryType type,
}
}
static cleanupFunc *gCommonCleanupFuncs[] = {
breakiterator_cleanup,
uprv_listformatter_cleanup,
locale_available_cleanup,
uloc_cleanup
};
U_CFUNC UBool ucln_lib_cleanup(void) {
ECleanupLibraryType libType = UCLN_START;
ECleanupCommonType commonFunc = UCLN_COMMON_START;