ICU-3718 Don't crash on slow machines

X-SVN-Rev: 15497
This commit is contained in:
George Rhoten 2004-05-24 17:11:40 +00:00
parent 42e5615866
commit 3a74c75e2f

View File

@ -1514,10 +1514,18 @@ void MultithreadTest::TestString()
}
cleanupAndReturn:
for(j = 0; j < kStringThreadThreads; j++) {
delete tests[j];
if (terrs == 0) {
/*
Don't clean up if there are errors. This prevents crashes if the
threads are still running and using this data. This will only happen
if there is an error with the test, ICU, or the machine is too slow.
It's better to leak than crash.
*/
for(j = 0; j < kStringThreadThreads; j++) {
delete tests[j];
}
delete testString;
}
return;
}