declare size as a local variable

very minor patch to the particles example