ICU-13568 Fixing memory leak in test.

X-SVN-Rev: 40875
This commit is contained in:
Shane Carr 2018-02-09 00:57:30 +00:00
parent 7626d9e846
commit e8e0cdf41d

View file

@ -8930,7 +8930,7 @@ void NumberFormatTest::Test11035_FormatCurrencyAmount() {
// Test two ways to set a currency via API
Locale loc1 = Locale("pt_PT");
NumberFormat* fmt1 = NumberFormat::createCurrencyInstance(loc1, status);
LocalPointer<NumberFormat> fmt1(NumberFormat::createCurrencyInstance(loc1, status));
assertSuccess("Creating fmt1", status);
fmt1->setCurrency(u"PTE", status);
assertSuccess("Setting currency on fmt1", status);
@ -8938,7 +8938,7 @@ void NumberFormatTest::Test11035_FormatCurrencyAmount() {
fmt1->format(amount, actualSetCurrency);
Locale loc2 = Locale("pt_PT@currency=PTE");
NumberFormat* fmt2 = NumberFormat::createCurrencyInstance(loc2, status);
LocalPointer<NumberFormat> fmt2(NumberFormat::createCurrencyInstance(loc2, status));
assertSuccess("Creating fmt2", status);
UnicodeString actualLocaleString;
fmt2->format(amount, actualLocaleString);