Exemple #1
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         _disposing = true;
         if (_bufferThread != null &&
             _bufferThread.ThreadState != ThreadState.Stopped &&
             !_bufferThread.Join(500))
         {
             _bufferThread.Abort();
         }
         if (_buffer != null)
         {
             _buffer.Dispose();
             _buffer = null;
         }
         if (_decoder != null)
         {
             _decoder.Dispose();
             _decoder = null;
         }
         CloseResponse();
     }
     _disposed = true;
 }
Exemple #2
0
 /// <summary>
 ///     Disposes the <see cref="WaveAggregatorBase.BaseSource" /> and releases all allocated resources.
 /// </summary>
 /// <param name="disposing">True to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
 protected override void Dispose(bool disposing)
 {
     _disposing = true;
     if (_bufferThread.WaitForExit(400))
     {
         _buffer.Dispose();
     }
     base.Dispose(disposing);
 }
 /// <summary>
 /// Disposes the <see cref="WriteableBufferingSource"/> and its internal buffer.
 /// </summary>
 /// <param name="disposing">True to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         //dispose managed
         _buffer.Dispose();
         _buffer = null;
     }
 }