예제 #1
0
 public void Initialize()
 {
     _instance               = this;
     _subscriptions          = new Dictionary <Action <TState>, IDisposable>();
     _synchronizationContext = SynchronizationContext.Current;
     _state   = Activator.CreateInstance <TState>();
     _changed = false;
 }
예제 #2
0
 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;
 }