Dispose() public abstract method

Release all resources used by the SoundReader.
public abstract Dispose ( ) : void
return void
Beispiel #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);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Releases all resources used by the <see cref="Music"/>.
 /// </summary>
 public override void Dispose()
 {
     _reader?.Dispose();
     base.Dispose();
 }