From 0e7c0d8716bdbcde9edae51d186f3ab022dcd876 Mon Sep 17 00:00:00 2001 From: Scott Russell Date: Mon, 16 Sep 2013 21:57:44 +0000 Subject: [PATCH] ICU-10261 give DateFormat more granular leniency control (fix memory leak in test) X-SVN-Rev: 34334 --- icu4c/source/test/intltest/dtfmttst.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp index a31a4fe0bb8..6e44fa726ef 100644 --- a/icu4c/source/test/intltest/dtfmttst.cpp +++ b/icu4c/source/test/intltest/dtfmttst.cpp @@ -4234,17 +4234,16 @@ void DateFormatTest::TestDateFormatLeniency() { sdmft->setBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, itemPtr->leniency, status).setBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, itemPtr->leniency, status); UDate d = sdmft->parse(itemPtr->parseString, pos); + delete sdmft; if(pos.getErrorIndex() > -1) if(itemPtr->expectedResult.length() != 0) { errln("error: unexpected error - " + itemPtr->parseString + " - error index " + pos.getErrorIndex() + " - leniency " + itemPtr->leniency); continue; } else continue; - - - } } + delete cal; } -- 2.40.0