remove redundant code and fix memory leaks
This commit is contained in:
@ -134,13 +134,9 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
}
|
}
|
||||||
char *fixID = nullptr;
|
char *fixID = nullptr;
|
||||||
|
|
||||||
thetastr = phistr = nullptr;
|
|
||||||
cflag = STATIC;
|
cflag = STATIC;
|
||||||
cx = cy = cz = 0.5;
|
cx = cy = cz = 0.5;
|
||||||
cxstr = cystr = czstr = nullptr;
|
|
||||||
|
|
||||||
upxstr = upystr = upzstr = nullptr;
|
|
||||||
zoomstr = nullptr;
|
|
||||||
boxflag = YES;
|
boxflag = YES;
|
||||||
boxdiam = 0.02;
|
boxdiam = 0.02;
|
||||||
axesflag = NO;
|
axesflag = NO;
|
||||||
@ -487,6 +483,16 @@ DumpImage::~DumpImage()
|
|||||||
memory->destroy(bufcopy);
|
memory->destroy(bufcopy);
|
||||||
memory->destroy(gbuf);
|
memory->destroy(gbuf);
|
||||||
|
|
||||||
|
delete[] upxstr;
|
||||||
|
delete[] upystr;
|
||||||
|
delete[] upzstr;
|
||||||
|
delete[] zoomstr;
|
||||||
|
delete[] thetastr;
|
||||||
|
delete[] phistr;
|
||||||
|
delete[] cxstr;
|
||||||
|
delete[] cystr;
|
||||||
|
delete[] czstr;
|
||||||
|
|
||||||
delete[] id_grid_compute;
|
delete[] id_grid_compute;
|
||||||
delete[] id_grid_fix;
|
delete[] id_grid_fix;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user