public void Initialize() { _instance = this; _subscriptions = new Dictionary <Action <TState>, IDisposable>(); _synchronizationContext = SynchronizationContext.Current; _state = Activator.CreateInstance <TState>(); _changed = false; }
public void Dispose() { Debug.LogWarning("Disposing..."); UniduxTickProvider.Unsubscribe(this); _instance = null; _state = null; _subject = null; _dispatcher = null; _synchronizationContext = null; repository.Dispose(); reducers.ToList().ForEach(r => r.Dispose()); reducers = null; }