Sometimes, it is necessary to remove a delegate binding. This is like setting a function pointer to nullptr so that it no longer references an object that has been deleted.
Unregistering a delegate
Getting ready
You'll need to follow the previous recipe so that you have a delegate to unregister.
How to do it...
- In the DelegateListener class, add the following overridden function declaration:
UFUNCTION()
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
- Implement the function like this:
void ADelegateListener::EndPlay(const EEndPlayReason...