This gives the option to detach registered callbacks.
Until now there was no way to clean up previous callbacks. In my case, I needed a callback to a high frequency event (MediaPlayerTimeChanged) for a limited amount of time.
In order to achieve this, I made attach return the raw pointer which can be used to feed detach.
This gives the option to detach registered callbacks. Until now there was no way to clean up previous callbacks. In my case, I needed a callback to a high frequency event (
MediaPlayerTimeChanged
) for a limited amount of time. In order to achieve this, I madeattach
return the raw pointer which can be used to feeddetach
.