--- branches/development/src/applications/staticProps/SpatialStatistics.cpp 2013/04/17 18:24:08 1865 +++ branches/development/src/applications/staticProps/SpatialStatistics.cpp 2013/05/15 15:09:35 1874 @@ -319,6 +319,11 @@ namespace OpenMD { z_->accumulator.push_back( new Accumulator() ); data_.push_back(z_); } + + SlabStatistics::~SlabStatistics() { + delete z_; + } + void SlabStatistics::processFrame(int istep) { RealType z; @@ -342,7 +347,6 @@ namespace OpenMD { return int(nBins_ * (pos.z() / hmat_(2,2) + 0.5)) % nBins_; } - ShellStatistics::ShellStatistics(SimInfo* info, const string& filename, const string& sele, int nbins) : SpatialStatistics(info, filename, sele, nbins){ @@ -366,6 +370,10 @@ namespace OpenMD { } } + ShellStatistics::~ShellStatistics() { + delete r_; + } + int ShellStatistics::getBin(Vector3d pos) { Vector3d rPos = pos - coordinateOrigin_; return int(rPos.length() / binWidth_);