Skip to content

Commit

Permalink
Merge pull request #5424 from bangerth/leak
Browse files Browse the repository at this point in the history
Fix a memory leak.
  • Loading branch information
gassmoeller authored Oct 7, 2023
2 parents d217806 + 9c4f1d0 commit 7727484
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions benchmarks/shear_bands/shear_bands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ namespace aspect
double noise_amplitude;
double background_porosity;
std::array<unsigned int,dim> grid_intervals;
Functions::InterpolatedUniformGridData<dim> *interpolate_noise;
std::unique_ptr<Functions::InterpolatedUniformGridData<dim>> interpolate_noise;
};


Expand Down Expand Up @@ -374,9 +374,10 @@ namespace aspect
}
}

interpolate_noise = new Functions::InterpolatedUniformGridData<dim> (grid_extents,
grid_intervals,
white_noise);
interpolate_noise
= std::make_unique<Functions::InterpolatedUniformGridData<dim>> (grid_extents,
grid_intervals,
white_noise);
}


Expand Down

0 comments on commit 7727484

Please sign in to comment.