close method

Future close()

Releases an Isar instance.

If this is the only isolate that holds a reference to this instance, the Isar instance will be closed.

Implementation

Future close() {
  _isOpen = false;
  if (identical(_instances[name], this)) {
    _instances.remove(name);
    if (_instances.isEmpty) {
      _schema = null;
    }
  }
  for (var callback in _closeCallbacks) {
    callback(name);
  }
  return Future.value();
}