@override Future<void> close() async { _isClosed = true; try { await _session?.close(); } finally { ffiClient.shutdown(); onClose(); } }