close method
Implementation
@override
Future<void> close() async {
_isClosed = true;
try {
await _session?.close();
// Copy because close() mutates _openSessions via the onClose callback.
for (final s in _openSessions.toList()) {
await s.close();
}
_openSessions.clear();
} finally {
ffiClient.shutdown();
onClose();
}
}