close method
Implementation
@override
Future<void> close() async {
_diShimEventSubscription?.cancel();
_diShimEventSubscription = null;
if (!_stateStreamController.isClosed) {
await _stateStreamController.close();
}
await super.close();
if (_handle != null) {
try {
bindings.phidgetClose(_handle!);
} catch (_) {}
final pDelete = calloc<bindings.PhidgetHandle>();
pDelete.value = _handle!;
try {
bindings.digitalInputDelete(pDelete);
} finally {
calloc.free(pDelete);
}
_handle = null;
// No need to access super._internalHandle here
}
isAttached = false;
}