remove redundant code and fix memory leaks
This commit is contained in:
@ -140,13 +140,9 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) :
|
||||
}
|
||||
char *fixID = nullptr;
|
||||
|
||||
thetastr = phistr = nullptr;
|
||||
cflag = STATIC;
|
||||
cx = cy = cz = 0.5;
|
||||
cxstr = cystr = czstr = nullptr;
|
||||
|
||||
upxstr = upystr = upzstr = nullptr;
|
||||
zoomstr = nullptr;
|
||||
boxflag = YES;
|
||||
boxdiam = 0.02;
|
||||
axesflag = NO;
|
||||
@ -471,6 +467,16 @@ DumpImage::~DumpImage()
|
||||
memory->destroy(bufcopy);
|
||||
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_fix;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user