Dispose() публичный абстрактный Метод

Release all resources used by the SoundReader.
public abstract Dispose ( ) : void
Результат void
Пример #1
0
        /// <summary>
        /// Releases the unmanaged resources used by the <see cref="SoundDecoder"/> and optionally releases the 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>
        /// <inheritdoc />
        protected override void Dispose(bool disposing)
        {
            if (!IsDisposed)
            {
                if (disposing)
                {
                    reader?.Dispose();
                }

                base.Dispose(disposing);
            }
        }
Пример #2
0
 /// <summary>
 /// Releases all resources used by the <see cref="Music"/>.
 /// </summary>
 public override void Dispose()
 {
     _reader?.Dispose();
     base.Dispose();
 }