Fixed memory error in ewald_disp.cpp
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12563 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -408,8 +408,15 @@ void EwaldDisp::allocate_peratom()
|
|||||||
|
|
||||||
void EwaldDisp::deallocate_peratom() // free memory
|
void EwaldDisp::deallocate_peratom() // free memory
|
||||||
{
|
{
|
||||||
|
if (energy_self_peratom) {
|
||||||
memory->destroy(energy_self_peratom);
|
memory->destroy(energy_self_peratom);
|
||||||
|
energy_self_peratom = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (virial_self_peratom) {
|
||||||
memory->destroy(virial_self_peratom);
|
memory->destroy(virial_self_peratom);
|
||||||
|
virial_self_peratom = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user