public void Close() { int fd = _fileDescriptor; _mode = _mode.Close(); _fileDescriptor = -1; if (_stream != null) { _stream = null; _context.CloseStream(fd); } }