diff --git a/DLASystem.cpp b/DLASystem.cpp index cb32911..ae35c41 100644 --- a/DLASystem.cpp +++ b/DLASystem.cpp @@ -23,14 +23,6 @@ void DLASystem::update() { } } -void DLASystem::clearParticles() { - // delete particles and the particle list - for (size_t i = 0; i < this->particleList.size(); i++) { - delete particleList[i]; - } - particleList.clear(); -} - // set the value of a grid cell for a particular position // note the position has the initial particle at (0,0) // but this corresponds to the middle of the grid array ie grid[ halfGrid ][ halfGrid ] @@ -205,7 +197,7 @@ DLASystem::DLASystem(Config config) // destructor DLASystem::~DLASystem() { // delete the particles - clearParticles(); + particleList.clear(); if (csv_out.is_open()) { csv_out.flush(); diff --git a/DLASystem.h b/DLASystem.h index 9e3be21..3897383 100644 --- a/DLASystem.h +++ b/DLASystem.h @@ -31,9 +31,6 @@ private: // list of particles std::vector particleList; - // delete particles and clear the particle list - void clearParticles(); - // size of cluster double clusterRadius; // these are related to the DLA algorithm