must destroy before allocate to avoid leaking
This commit is contained in:
@ -54,6 +54,7 @@ void FixQEqPoint::init()
|
||||
neighbor->add_request(this, NeighConst::REQ_FULL);
|
||||
|
||||
int ntypes = atom->ntypes;
|
||||
memory->destroy(shld);
|
||||
memory->create(shld, ntypes + 1, ntypes + 1, "qeq:shielding");
|
||||
}
|
||||
|
||||
|
||||
@ -56,6 +56,7 @@ void FixQEqShielded::init()
|
||||
neighbor->add_request(this, NeighConst::REQ_FULL);
|
||||
|
||||
const int ntypes = atom->ntypes;
|
||||
memory->destroy(shld);
|
||||
memory->create(shld, ntypes + 1, ntypes + 1, "qeq:shielding");
|
||||
|
||||
init_shielding();
|
||||
|
||||
Reference in New Issue
Block a user