Commit e5e340aa authored by Giacomo Mulas's avatar Giacomo Mulas
Browse files

Merge branch 'test_omp_cluster' into 'master'

free zpv before c4, since it needs c4->lm: now valgrind is clean.

See merge request giacomo.mulas/np_tmcode!28
parents e785aa51 c1807a4e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -672,12 +672,6 @@ void cluster(string config_file, string data_file, string output_path) {
    }
    fclose(output);
    // Clean memory
    delete c1;
    delete c1ao;
    delete c3;
    delete c4;
    delete c6;
    delete c9;
    for (int zi = c4->lm - 1; zi > -1; zi--) {
      for (int zj = 2; zj > -1; zj--) {
	delete[] zpv[zi][zj][1];
@@ -687,6 +681,12 @@ void cluster(string config_file, string data_file, string output_path) {
      delete[] zpv[zi];
    }
    delete[] zpv;
    delete c1;
    delete c1ao;
    delete c3;
    delete c4;
    delete c6;
    delete c9;
    delete[] am_vector;
    delete[] am;
    //delete[] tam;