示例#1
0
 /// <summary>
 /// Releases all managed resources.
 /// </summary>
 /// <param name="disposing">If <c>true</c>, all managed resources including the SPI connection will be released/closed.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         transferBuffer.Dispose();
         connection.Dispose();
     }
 }
 protected override void Cleanup()
 {
     if (!ReferenceEquals(buffer, null))
     {
         buffer.Dispose();
         buffer = null;
     }
 }
示例#3
0
        // Protected implementation of Dispose pattern.
        protected void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                spiConnection.Dispose();
                inputPollBuffer.Dispose();
            }

            disposed = true;
        }