No, it is not necessary.
Make sure your energy supplier knows that you are moving out and fill in the energy transfer document, together with the new occupant or the owner.