mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-432 Removed a very small leak in the translator. There is still a lot of leaks in transliteration
X-SVN-Rev: 3260
This commit is contained in:
parent
6977b828c1
commit
76dc0104b5
1 changed files with 4 additions and 2 deletions
|
@ -30,6 +30,8 @@
|
|||
const UChar Transliterator::ID_SEP = 0x002D; /*-*/
|
||||
const UChar Transliterator::ID_DELIM = 0x003B; /*;*/
|
||||
|
||||
static Hashtable _cache;
|
||||
|
||||
/**
|
||||
* Dictionary of known transliterators. Keys are <code>String</code>
|
||||
* names, values are one of the following:
|
||||
|
@ -48,7 +50,7 @@ const UChar Transliterator::ID_DELIM = 0x003B; /*;*/
|
|||
* RuleBasedTransliterator constructor.
|
||||
* </ul>
|
||||
*/
|
||||
Hashtable* Transliterator::cache = 0;
|
||||
Hashtable* Transliterator::cache = &_cache;
|
||||
|
||||
/**
|
||||
* The mutex controlling access to the cache.
|
||||
|
@ -824,7 +826,7 @@ void Transliterator::initializeCache(void) {
|
|||
// Before looking for the resource, construct our cache.
|
||||
// That way if the resource is absent, we will at least
|
||||
// have a valid cache object.
|
||||
cache = new Hashtable(status); // TODO: What if this call fails?
|
||||
// cache = new Hashtable(status); // TODO: What if this call fails?
|
||||
cacheIDs.setComparer(compareIDs);
|
||||
|
||||
/* The following code parses the index table located in
|
||||
|
|
Loading…
Add table
Reference in a new issue