dispose method
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:
- deactivate, which is called prior to dispose.
Implementation
@mustCallSuper
void dispose() {
deactivate();
for (var studyDeploymentId in repository.keys) {
getStudyRuntime(studyDeploymentId)?.dispose();
}
_group.close();
Persistence().close();
_state = ClientManagerState.disposed;
}