for (var i = 0; i < particle_count; i++) { with (particles[i]) instance_destroy(); } if (surface_exists(surface)) surface_free(surface);