ICU-1682 (weiv) fixed a leak in canonical iterator test
X-SVN-Rev: 8182
This commit is contained in:
parent
dedd84d540
commit
a1f5332dab
@ -162,10 +162,12 @@ void CanonicalIteratorTest::TestBasic() {
|
|||||||
int counter = 0;
|
int counter = 0;
|
||||||
set->removeAll();
|
set->removeAll();
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
UnicodeString *result = new UnicodeString(it.next());
|
//UnicodeString *result = new UnicodeString(it.next());
|
||||||
if (*result == "")
|
UnicodeString result(it.next());
|
||||||
|
if (result == "") {
|
||||||
break;
|
break;
|
||||||
set->put(*result, result, status); // Add result to the table
|
}
|
||||||
|
set->put(result, new UnicodeString(result), status); // Add result to the table
|
||||||
//logln(++counter + ": " + hex.transliterate(result));
|
//logln(++counter + ": " + hex.transliterate(result));
|
||||||
//logln(" = " + name.transliterate(result));
|
//logln(" = " + name.transliterate(result));
|
||||||
}
|
}
|
||||||
@ -257,6 +259,7 @@ UnicodeString CanonicalIteratorTest::collectionToString(Hashtable *col) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
delete [] resArray;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user