示例#1
0
 // The bulk of the clean-up code is implemented in Dispose(bool)
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         // free managed resources here
         if (_AudioEndpointVolume != null)
         {
             _AudioEndpointVolume.Dispose();
         }
     }
     // free native resources here if there are any.
 }
        protected virtual void Dispose(bool disposing)
        {
            lock (syncLock)
            {
                if (disposing)
                {
                    // Release disposable objects used by this instance here.

                    if (_Parent != null)
                    {
                        _Parent.Dispose();
                    }
                }

                // Release unmanaged resources here. Don't access reference type fields.
            }
        }