remove unused class members and plug memory leaks

This commit is contained in:
Axel Kohlmeyer
2025-04-10 04:39:56 -04:00
parent 32592e6660
commit 227b4ed12d
2 changed files with 15 additions and 1 deletions

View File

@ -66,6 +66,20 @@ enum { BISECTION, QUASIRANDOM };
static constexpr const char *mesh_name[] = {"recursive bisection", "quasi-random"};
/* ---------------------------------------------------------------------- */
CreateAtoms::~CreateAtoms()
{
delete[] basistype;
memory->destroy(xmol);
delete[] vstr;
delete[] xstr;
delete[] ystr;
delete[] zstr;
delete[] groupname;
delete ranmol;
delete ranlat;
}
CreateAtoms::CreateAtoms(LAMMPS *lmp) : Command(lmp), basistype(nullptr) {}
/* ---------------------------------------------------------------------- */