In Fragment examples involving callbacks, usually they assign the listener in the onAttach method and then set the listener to null in the onDetach method.
It's better to null the listener because you don't know when the garbage collector will destroy it. It's not really necessary to do this but it's good coding style.