Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/LinkedCell/linkedcell.cpp

    r94d5ac6 r052c10  
    141141LinkedCell_deprecated::~LinkedCell_deprecated()
    142142{
    143   if (LC != NULL)
    144   for (index=0;index<N[0]*N[1]*N[2];index++)
    145     LC[index].clear();
    146   delete[](LC);
     143  if (LC != NULL) {
     144    for (index=0;index<N[0]*N[1]*N[2];index++) {
     145      // don't delete pointers are just "borrowed"
     146      LC[index].clear();
     147    }
     148    delete[] LC;
     149  }
    147150  for(int i=0;i<NDIM;i++)
    148151    N[i] = 0;
     
    367370      }
    368371    }
    369     delete(NeighbourList);
     372    delete NeighbourList;
    370373  } else
    371374    ELOG(2, "Around vector " << *center << " there are no atoms.");
Note: See TracChangeset for help on using the changeset viewer.