dispose method

void dispose()
inherited

Discards resources in the pot.

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

Note

This method internally calls the reset method, which triggers the disposer.

Implementation

void dispose() {
  if (!_isDisposed) {
    reset();
    _isDisposed = true;
    _disposer = null;
    PotManager.allInstances.remove(_pot);
    PotManager.eventHandler.addEvent(PotEventKind.disposed, pots: [_pot]);
  }
}