Commit e3e5a962 authored by jrgissing's avatar jrgissing
Browse files

bond/react memory: correctly delete internal groups

internally-created groups should be deleted when unfixing bond/react
groups should not be deleted when LAMMPS exits (because they already have been)
parent e133c60f
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -472,6 +472,7 @@ FixBondReact::~FixBondReact()
  delete [] guess_branch;
  delete [] pioneer_count;

  if (group) {
    char **newarg;
    newarg = new char*[2];
    newarg[0] = master_group;
@@ -484,6 +485,7 @@ FixBondReact::~FixBondReact()
    }
    delete [] newarg;
  }
}

/* ---------------------------------------------------------------------- */