/// <summary> /// Closes this file input stream and releases any system resources /// associated with the stream. /// </summary> /// <exception cref="IOException"> if an I/O error occurs. </exception> public virtual void close() { if (fd != null) { fd.close(); } else { throw new System.IO.IOException("1-Wire FileDescriptor is null"); } fd = null; }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (fd != null) { fd.close(); } } }