destroying polling function when it's don't needed.