mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-10682 Fix memory leak in trunk.
X-SVN-Rev: 35087
This commit is contained in:
parent
25c7ba8e57
commit
897a4241a5
1 changed files with 5 additions and 3 deletions
|
@ -3134,13 +3134,15 @@ void NumberFormatTest::TestNumberingSystems() {
|
|||
ec = U_ZERO_ERROR;
|
||||
Locale loc = Locale::createFromName(item->localeName);
|
||||
|
||||
// Clone to test ticket #10682
|
||||
NumberFormat *fmt = (NumberFormat *) NumberFormat::createInstance(loc,ec)->clone();
|
||||
|
||||
NumberFormat *origFmt = NumberFormat::createInstance(loc,ec);
|
||||
if (U_FAILURE(ec)) {
|
||||
dataerrln("FAIL: getInstance(%s) - %s", item->localeName, u_errorName(ec));
|
||||
continue;
|
||||
}
|
||||
// Clone to test ticket #10682
|
||||
NumberFormat *fmt = (NumberFormat *) origFmt->clone();
|
||||
delete origFmt;
|
||||
|
||||
|
||||
if (item->isRBNF) {
|
||||
expect3(*fmt,item->value,CharsToUnicodeString(item->expectedResult));
|
||||
|
|
Loading…
Add table
Reference in a new issue