Clear all event subscriptions on application shutdown.
This commit is contained in:
@@ -34,6 +34,14 @@ namespace Utils
|
||||
LastUpdated?.Invoke();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
Updated = null;
|
||||
LateUpdated = null;
|
||||
EarlyUpdated = null;
|
||||
LastUpdated = null;
|
||||
}
|
||||
|
||||
public static Delegate[] EarlyUpdateDelegates => EarlyUpdated?.GetInvocationList();
|
||||
|
||||
public static int EarlyUpdateLength => EarlyUpdateDelegates?.Length ?? 0;
|
||||
|
Reference in New Issue
Block a user