plug memory leaks

This commit is contained in:
Axel Kohlmeyer
2021-10-15 16:59:53 -04:00
parent 98cdfa1016
commit 5140d26748

View File

@ -181,6 +181,8 @@ void ComputeOrientOrderAtom::init()
error->all(FLERR,"Compute orientorder/atom cutoff is "
"longer than pairwise cutoff");
memory->destroy(qnm_r);
memory->destroy(qnm_i);
memory->create(qnm_r,nqlist,2*qmax+1,"orientorder/atom:qnm_r");
memory->create(qnm_i,nqlist,2*qmax+1,"orientorder/atom:qnm_i");
@ -652,6 +654,7 @@ void ComputeOrientOrderAtom::init_clebsch_gordan()
idxcg_count++;
}
idxcg_max = idxcg_count;
memory->destroy(cglist);
memory->create(cglist, idxcg_max, "computeorientorderatom:cglist");
idxcg_count = 0;