On editor exit play mode

I wonder if there is some event or a virtual function being called when the editor exits play mode (stops simulation). What I need is to clear my custom events invocation lists at that time. They are kept in the static class, so it continues to live even after the editor stops simulation, therefore bringing problems on sequential simulations.

If you do c++ you can implement the BeginDestroy() and do Class specific stuff there

The class I was talking about was a Slate widget, so it doesn’t have the BeginDestroy method, as it is not inherited from UObject. (I was not clear about that in my question — my mistake)

However, in my case the solution was a trivial one: I’ve just used the default class destructor to remove delegates, and it worked fine.

Nevertheless, in case it’s a some subclass of an UObject — I assume your answer is correct, so I will accept it. Thanks!