ICU-1272 Hide the cleanup functionality

X-SVN-Rev: 7474
This commit is contained in:
George Rhoten 2002-01-23 02:01:19 +00:00
parent 4ab5d75392
commit 9307dbf205
5 changed files with 24 additions and 32 deletions

View file

@ -20,7 +20,7 @@
static UBool i18n_cleanup(void)
{
transliterator_cleanup();
unicodeset_cleanup();
unicodePropertySet_cleanup();
dateFormatSymbols_cleanup();
timeZone_cleanup();
ucol_cleanup();

View file

@ -26,7 +26,7 @@ U_CFUNC void ucln_i18n_registerCleanup(void);
U_CFUNC UBool transliterator_cleanup(void);
U_CFUNC UBool unicodeset_cleanup(void);
U_CFUNC UBool unicodePropertySet_cleanup(void);
U_CFUNC UBool dateFormatSymbols_cleanup(void);

View file

@ -15,8 +15,6 @@
#include "symtable.h"
#include "cmemory.h"
#include "rbt_rule.h"
#include "umutex.h"
#include "ucln_in.h"
#include "upropset.h"
#include "util.h"
@ -86,15 +84,6 @@ static const UChar CATEGORY_NAMES[] = {
*/
static const UChar CATEGORY_CLOSE[] = {COLON, SET_CLOSE, 0x0000}; /* ":]" */
/**
* Cleanup function for transliterator component; delegates to
* Transliterator::cleanupRegistry().
*/
U_CFUNC UBool unicodeset_cleanup(void) {
UnicodePropertySet::cleanup();
return TRUE;
}
U_NAMESPACE_BEGIN
/**

View file

@ -4,8 +4,8 @@
* Corporation and others. All Rights Reserved.
**********************************************************************
* $Source: /xsrl/Nsvn/icu/icu/source/i18n/Attic/upropset.cpp,v $
* $Date: 2002/01/12 00:22:55 $
* $Revision: 1.12 $
* $Date: 2002/01/23 02:01:18 $
* $Revision: 1.13 $
**********************************************************************
*/
#include "upropset.h"
@ -20,7 +20,6 @@
#include "ucln_in.h"
#include "charstr.h"
U_NAMESPACE_BEGIN
static Hashtable* NAME_MAP = NULL;
@ -119,6 +118,23 @@ static const UChar INCLUSIONS_PATTERN[] =
92,85,48,48,49,48,48,48,48,49,45,92,85,48,48,49,48,70,70,70,68,93,0};
// "[^\\u3401-\\u4DB5 \\u4E01-\\u9FA5 \\uAC01-\\uD7A3 \\uD801-\\uDB7F \\uDB81-\\uDBFF \\uDC01-\\uDFFF \\uE001-\\uF8FF \\U0001044F-\\U0001CFFF \\U0001D801-\\U0001FFFF \\U00020001-\\U0002A6D6 \\U0002A6D8-\\U0002F7FF \\U0002FA1F-\\U000E0000 \\U000E0081-\\U000EFFFF \\U000F0001-\\U000FFFFD \\U00100001-\\U0010FFFD]"
/**
* Cleanup function for transliterator component; delegates to
* Transliterator::cleanupRegistry().
*/
U_CFUNC UBool unicodePropertySet_cleanup(void) {
if (NAME_MAP != NULL) {
delete NAME_MAP; NAME_MAP = NULL;
delete CATEGORY_MAP; CATEGORY_MAP = NULL;
delete[] CATEGORY_CACHE; CATEGORY_CACHE = NULL;
delete[] SCRIPT_CACHE; SCRIPT_CACHE = NULL;
delete INCLUSIONS; INCLUSIONS = NULL;
}
return TRUE;
}
U_NAMESPACE_BEGIN
//----------------------------------------------------------------
// Public API
//----------------------------------------------------------------
@ -649,16 +665,6 @@ void UnicodePropertySet::init() {
1 << U_SPACE_SEPARATOR);
}
void UnicodePropertySet::cleanup() {
if (NAME_MAP != NULL) {
delete NAME_MAP; NAME_MAP = NULL;
delete CATEGORY_MAP; CATEGORY_MAP = NULL;
delete[] CATEGORY_CACHE; CATEGORY_CACHE = NULL;
delete[] SCRIPT_CACHE; SCRIPT_CACHE = NULL;
delete INCLUSIONS; INCLUSIONS = NULL;
}
}
U_NAMESPACE_END
//eof

View file

@ -4,8 +4,8 @@
* Corporation and others. All Rights Reserved.
**********************************************************************
* $Source: /xsrl/Nsvn/icu/icu/source/i18n/Attic/upropset.h,v $
* $Date: 2001/10/18 17:20:02 $
* $Revision: 1.2 $
* $Date: 2002/01/23 02:01:19 $
* $Revision: 1.3 $
**********************************************************************
*/
#ifndef _UPROPSET_H_
@ -59,7 +59,7 @@ class Hashtable;
* '+' indicates a supported property.
*
* @author Alan Liu
* @version $RCSfile: upropset.h,v $ $Revision: 1.2 $ $Date: 2001/10/18 17:20:02 $
* @version $RCSfile: upropset.h,v $ $Revision: 1.3 $ $Date: 2002/01/23 02:01:19 $
*/
class UnicodePropertySet {
@ -206,9 +206,6 @@ class UnicodePropertySet {
static void init();
public:
static void cleanup();
private:
//----------------------------------------------------------------
// SetFactory <=> void*