Updated move function to deallocate memory when removing elements from projectiles vector