close method

void close()

Closes and cleans up all resources used by this sync client. It can no longer be used afterwards, make a new sync client instead. Does nothing if this sync client has already been closed.

Implementation

void close() {
  _connectionEvents?._stop();
  _loginEvents?._stop();
  _completionEvents?._stop();
  _changeEvents?._stop();
  final err = C.sync_close(_cSync);
  _cSync = nullptr;
  syncClientsStorage.remove(_store);
  InternalStoreAccess.removeCloseListener(_store, this);
  checkObx(err);
}