void ClearAllParticles(){ 
		for (ParticlesIterator pIter = g_particles.begin(); pIter != g_particles.end(); ++pIter ) {
			Particle* p = *(pIter);
			if (p) {
				delete p;
				p = NULL;
			}
		}
		g_particles.clear();
	}
Exemple #2
0
	void removeFlagged()
	{
		for(Particles::iterator iter = removeList.begin();
			iter != removeList.end();
			++iter)
		{
			Particle *p = *iter;
			_remove(p);
		}
		removeList.clear();
	}