The leak will be prevented only when remove_watch is called.
For a custom watch implementation: the benefit is that there is no need to use weak pointer in order to not leak resources used in the watch.
For a message parsing loop using the bus receiver (as done in the playbin example): the loop could be kept idle after eos to handle another play later and be stopped from another thread using remove_watch.
The leak will be prevented only when remove_watch is called.
For a custom watch implementation: the benefit is that there is no need to use weak pointer in order to not leak resources used in the watch.
For a message parsing loop using the bus receiver (as done in the playbin example): the loop could be kept idle after eos to handle another play later and be stopped from another thread using remove_watch.