Anybody for a quick way of killing particles?

Hi there,
can anybody suggest a quick way of killing particles?

I am stuck with my particle system and am looking for a final touch, at the moment everything works apart from the fact that I cannot kill the particles and they are overpopulating the scene.

Here is my code in testApp.cpp
It is a particle system that is reacting to sound, hence the scaledVol value.
I am sure it is an easy question, I am just getting to know OF better.

void testApp::update(){

for(int i = 0; i < 2.77; i++){

for(int i =0; i < particles.size(); i++){


Many thanks everyone!



particles.clear(); will empty the particles vector

for(int i=0; i<particles.size(); i++)  
//assuming your Particle class has a .y value, remove the ones below half the screen  
	if(particles[i].y > ofGetHeight()/2)  

looking much better now!!!