dispose method

void dispose()
inherited

Discards resources in the pot.

Once this is called, the pot is no longer in a usable state, and calls to its members will throw.

Implementation

void dispose() {
  reset();
  _isDisposed = true;
  _scope = null;
  _disposer = null;
  StaticPot.scopes.removePot(_pot);
  StaticPot.allInstances.remove(_pot);
  StaticPot.eventHandler.addEvent(PotEventKind.disposed, pots: [_pot]);
}