mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-6694 Fix to delete internal NumberingSystems when they are no longer needed
X-SVN-Rev: 25306
This commit is contained in:
parent
07e008ff60
commit
af79a4c70f
2 changed files with 6 additions and 0 deletions
|
@ -169,6 +169,9 @@ DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status,
|
|||
UnicodeString zeroDigit(ns->getDescription(),0,1);
|
||||
setSymbol(kZeroDigitSymbol,zeroDigit);
|
||||
}
|
||||
if (ns) {
|
||||
delete ns;
|
||||
}
|
||||
|
||||
// Obtain currency data from the currency API. This is strictly
|
||||
// for backward compatibility; we don't use DecimalFormatSymbols
|
||||
|
|
|
@ -923,6 +923,9 @@ NumberFormat::makeInstance(const Locale& desiredLocale,
|
|||
cleanup:
|
||||
ures_close(numberPatterns);
|
||||
ures_close(resource);
|
||||
if (ns) {
|
||||
delete ns;
|
||||
}
|
||||
if (U_FAILURE(status)) {
|
||||
/* If f exists, then it will delete the symbols */
|
||||
if (f==NULL) {
|
||||
|
|
Loading…
Add table
Reference in a new issue