dispose method

void dispose()

Releases all internal native resources.

Implementation

void dispose() {
  _checkStatus();
  _invalid = true;
  try {
    _checkError(_nativeI2Cclose(_i2cHandle));
  } finally {
    _nativeI2Cfree(_i2cHandle);
    if (_nativeName != null) {
      malloc.free(_nativeName!);
    }
  }
}