@@ -240,6 +240,7 @@ TEST_F(ParaReduce, GatherIntAll)
240240 // / printf("post rank %d array[%d] = %d, min = %d \n",
241241 // / my_rank,i,array[i],min_number);
242242 }
243+ delete[] array;
243244}
244245
245246TEST_F (ParaReduce, GatherDoubleAll)
@@ -266,6 +267,7 @@ TEST_F(ParaReduce, GatherDoubleAll)
266267 // / printf("post rank %d array[%d] = %f, min = %f, max = %f \n",
267268 // / my_rank,i,array[i],min_number,max_number);
268269 }
270+ delete[] array;
269271}
270272
271273TEST_F (ParaReduce, ReduceIntDiag)
@@ -306,6 +308,7 @@ TEST_F(ParaReduce, ReduceIntDiag)
306308 // / my_rank,mpiContext.dsize,diag_sum_first, diag_sum_second);
307309 EXPECT_EQ (diag_sum_first, diag_sum_second);
308310 delete[] rand_array;
311+ delete[] swap;
309312 MPI_Comm_free (&DIAG_WORLD);
310313 }
311314}
@@ -595,7 +598,7 @@ TEST_F(ParaReduce, GatherDoublePool)
595598 // / printf("post rank %d, pool rank %d, array[%d] = %f, min = %f, max = %f \n",
596599 // / my_rank,mpiContext.rank_in_pool,i,array[i],min_number,max_number);
597600 }
598-
601+ delete[] array;
599602 MPI_Comm_free (&POOL_WORLD);
600603 }
601604}
0 commit comments