fix valgrind issues
This commit is contained in:
@ -273,7 +273,7 @@ void ComputePropertyGrid::deallocate_grid()
|
||||
delete grid2d;
|
||||
delete grid3d;
|
||||
memory->destroy2d_offset(vec2d, nylo_out, nxlo_out);
|
||||
memory->destroy2d_offset(array2d, nylo_out, nxlo_out);
|
||||
memory->destroy3d_offset_last(array2d, nylo_out, nxlo_out);
|
||||
memory->destroy3d_offset(vec3d, nzlo_out, nylo_out, nxlo_out);
|
||||
memory->destroy4d_offset_last(array3d, nzlo_out, nylo_out, nxlo_out);
|
||||
}
|
||||
|
||||
@ -466,6 +466,9 @@ DumpImage::~DumpImage()
|
||||
memory->destroy(chooseghost);
|
||||
memory->destroy(bufcopy);
|
||||
memory->destroy(gbuf);
|
||||
|
||||
delete [] id_grid_compute;
|
||||
delete [] id_grid_fix;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -330,7 +330,7 @@ FixAveGrid::FixAveGrid(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
grid_sample = allocate_one_grid();
|
||||
grid_nfreq = allocate_one_grid();
|
||||
if (aveflag == RUNNING || aveflag == WINDOW) grid_nfreq = allocate_one_grid();
|
||||
if (aveflag == RUNNING || aveflag == WINDOW) grid_running = allocate_one_grid();
|
||||
if (aveflag == WINDOW) {
|
||||
grid_window = new GridData*[nwindow];
|
||||
for (int i = 0; i < nwindow; i++)
|
||||
@ -2045,13 +2045,21 @@ void FixAveGrid::reset_grid()
|
||||
grid_window_previous[i] = clone_one_grid(grid_window[i]);
|
||||
}
|
||||
|
||||
delete grid_sample;
|
||||
delete grid_nfreq;
|
||||
if (aveflag == RUNNING || aveflag == WINDOW) delete grid_running;
|
||||
if (aveflag == WINDOW) {
|
||||
for (int i = 0; i < nwindow; i++)
|
||||
delete grid_window;
|
||||
}
|
||||
|
||||
// allocate grid instance and grid data for new decomposition
|
||||
|
||||
allocate_grid();
|
||||
|
||||
grid_sample = allocate_one_grid();
|
||||
grid_nfreq = allocate_one_grid();
|
||||
if (aveflag == RUNNING || aveflag == WINDOW) grid_nfreq = allocate_one_grid();
|
||||
if (aveflag == RUNNING || aveflag == WINDOW) grid_running = allocate_one_grid();
|
||||
if (aveflag == WINDOW) {
|
||||
grid_window = new GridData*[nwindow];
|
||||
for (int i = 0; i < nwindow; i++)
|
||||
|
||||
Reference in New Issue
Block a user