ICU-3718 Don't crash on slow machines
X-SVN-Rev: 15497
This commit is contained in:
parent
42e5615866
commit
3a74c75e2f
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user