These are completely optional, as many Actors will not actually die during play.
Destroy - is called manually by game any time an Actor is meant to be removed, but gameplay is still occurring. The Actor is marked pending kill and removed from Level's array of Actors.
EndPlay - Called in several places to guarantee the life of the Actor is coming to an end. During play, Destroy will fire this, as well Level Transitions, and if a streaming level containing the Actor is unloaded. All the places EndPlay is called from:
Explicit call to Destroy
Play in Editor Ended
Level Transition (seamless travel or load map)
A streaming level containing the Actor is unloaded
The lifetime of the Actor has expired
Application shut down (All Actors are Destroyed)
Regardless of how this happens, the Actor will be marked RF_PendingKill so during the next garbage collection cycle it will be deallocated. Also, rather than checking for pending kill manually, consider using an
FWeakObjectPtr<AActor> as it is cleaner.
OnDestroy - This is a legacy response to Destroy. You should probably move anything here to EndPlay as it is called by level transition and other game cleanup functions.