@@ -1459,8 +1459,7 @@ static void exactSearch(PatternComposer& _patsrc,
14591459 if (!refs->loaded ()) throw 1 ;
14601460 }
14611461 exactSearch_refs = refs;
1462- vector<int > tids;
1463- tids.reserve (max (nthreads, thread_ceiling));
1462+ int tids[max (nthreads, thread_ceiling)];
14641463#ifdef WITH_TBB
14651464 vector<std::thread*> threads;
14661465 vector<thread_tracking_pair> tps;
@@ -1570,7 +1569,6 @@ static void exactSearch(PatternComposer& _patsrc,
15701569 for (int i = 0 ; i < nthreads; i++) {
15711570 threads[i]->join ();
15721571 }
1573- delete[] tids;
15741572#endif
15751573
15761574#ifndef _WIN32
@@ -1844,8 +1842,7 @@ static void mismatchSearchFull(PatternComposer& _patsrc,
18441842 }
18451843 mismatchSearch_refs = refs;
18461844
1847- vector<int > tids;
1848- tids.reserve (max (nthreads, thread_ceiling));
1845+ int tids[max (nthreads, thread_ceiling)];
18491846#ifdef WITH_TBB
18501847 vector<std::thread*> threads;
18511848 vector<thread_tracking_pair> tps;
@@ -1956,7 +1953,6 @@ static void mismatchSearchFull(PatternComposer& _patsrc,
19561953 for (int i = 0 ; i < nthreads; i++) {
19571954 threads[i]->join ();
19581955 }
1959- delete[] tids;
19601956#endif
19611957
19621958#ifndef _WIN32
@@ -2349,8 +2345,7 @@ static void twoOrThreeMismatchSearchFull(
23492345 twoOrThreeMismatchSearch_hitMask = NULL ;
23502346 twoOrThreeMismatchSearch_two = two;
23512347
2352- vector<int > tids;
2353- tids.reserve (max (nthreads, thread_ceiling));
2348+ int tids[max (nthreads, thread_ceiling)];
23542349#ifdef WITH_TBB
23552350 vector<std::thread*> threads;
23562351 vector<thread_tracking_pair> tps;
@@ -2461,7 +2456,6 @@ static void twoOrThreeMismatchSearchFull(
24612456 for (int i = 0 ; i < nthreads; i++) {
24622457 threads[i]->join ();
24632458 }
2464- delete[] tids;
24652459#endif
24662460
24672461#ifndef _WIN32
@@ -2901,8 +2895,7 @@ static void seededQualCutoffSearchFull(
29012895 }
29022896 seededQualSearch_refs = refs;
29032897
2904- vector<int > tids;
2905- tids.reserve (max (nthreads, thread_ceiling));
2898+ int tids[max (nthreads, thread_ceiling)];
29062899#ifdef WITH_TBB
29072900 vector<std::thread*> threads;
29082901 vector<thread_tracking_pair> tps;
@@ -3021,7 +3014,6 @@ static void seededQualCutoffSearchFull(
30213014 for (int i = 0 ; i < nthreads; i++) {
30223015 threads[i]->join ();
30233016 }
3024- delete[] tids;
30253017#endif
30263018
30273019#ifndef _WIN32
0 commit comments