ICU-4559 Fix memory leaks

X-SVN-Rev: 18271
This commit is contained in:
George Rhoten 2005-07-18 17:11:32 +00:00
parent 535e77b8de
commit 766fb06f3c
4 changed files with 6 additions and 0 deletions

View file

@ -121,10 +121,12 @@ UBool IdnaConfTest::ReadAndConvertFile(){
len = dest_len;
base = dest;
delete [] source;
ucnv_close(conv);
return TRUE; // The buffer will owned by caller.
}
errln("UConverter error: %s", u_errorName(status));
delete [] source;
ucnv_close(conv);
return FALSE;
}

View file

@ -638,6 +638,7 @@ void IntlCalendarTest::TestJapanese3860()
#endif
delete cal2;
delete cal;
delete fmt2;
}
void IntlCalendarTest::simpleTest(const Locale& loc, const UnicodeString& expect, UDate expectDate, UErrorCode& status)

View file

@ -1526,6 +1526,7 @@ void NumberFormatTest::TestCurrencyUnit(void){
if (!(*cu3 == cu)){
errln("CurrencyUnit cloned object should be same");
}
delete cu3;
}
void NumberFormatTest::TestCurrencyAmount(void){
@ -1548,6 +1549,7 @@ void NumberFormatTest::TestCurrencyAmount(void){
if (!(*ca3 == ca)){
errln("CurrencyAmount cloned object should be same");
}
delete ca3;
}
void NumberFormatTest::TestSymbolsWithBadLocale(void) {

View file

@ -851,6 +851,7 @@ void UTextTest::ErrorTest()
TEST_ASSERT(buf[1] == 0xfffd);
TEST_ASSERT(buf[3] == 0xfffd);
TEST_ASSERT(buf[2] == 0x42);
utext_close(ut);
}