Destroy spawned projectile after kill enemy

Why do you want to destroy the arrows while they are still flying? Or do you want to destroy them after they hit something? Easiest way would be just to destroy the arrow automatically by itself, after a certain timespan.