close method
Releases an Isar instance.
If this is the only isolate that holds a reference to this instance, the
Isar instance will be closed. deleteFromDisk
additionally removes all
database files if enabled.
Returns whether the instance was actually closed.
Implementation
Future<bool> close({bool deleteFromDisk = false}) {
requireOpen();
_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(false);
}