Merge pull request #2285 from twhitehead/comm-for-fix-destructors

Move comm destruction to after modify to leave available for fixes
This commit is contained in:
Axel Kohlmeyer
2020-08-11 15:21:36 -04:00
committed by GitHub

View File

@ -854,9 +854,6 @@ void LAMMPS::destroy()
delete neighbor;
neighbor = NULL;
delete comm;
comm = NULL;
delete force;
force = NULL;
@ -870,6 +867,10 @@ void LAMMPS::destroy()
// since they delete fixes
modify = NULL;
delete comm; // comm must come after modify
// since fix destructors may access comm
comm = NULL;
delete domain; // domain must come after modify
// since fix destructors access domain
domain = NULL;