dispose method

  1. @mustCallSuper
void dispose()

Called when this client is disposed permanently.

When this method is called, the client is never used again. It is an error to call any of the start or stop methods at this point.

Subclasses should override this method to release any resources retained by this client. Implementations of this method should end with a call to the inherited method, as in super.dispose().

See also:

Implementation

@mustCallSuper
void dispose() {
  deactivate();
  for (var study in studies) {
    getStudyRuntime(study)?.dispose();
  }
  _group.close();
  Persistence().close();
  _state = ClientManagerState.disposed;
}