Пример #1
0
        protected override void Dispose(bool isDisposing)
        {
            try {
                // Release unmanaged resources
                libvlc_exception_t exc = new libvlc_exception_t();
                LibVlcInterop.libvlc_exception_init(ref exc);
                LibVlcInterop.libvlc_log_close(descriptor, ref exc);
                if (exc.b_raised != 0)
                {
                    // Do not throw any exception in finalizer thread
                    if (isDisposing)
                    {
                        throw new VlcInternalException(exc.Message);
                    }
                    else
                    {
#if DEBUG
                        Debugger.Log(0, Debugger.DefaultCategory, String.Format("libvlc exception during finalizing a {0} : {1}", GetType(), exc.Message));
#endif
                    }
                }
            } finally {
                base.Dispose(isDisposing);
            }
        }
Пример #2
0
 protected override void Dispose(bool isDisposing)
 {
     try {
         // Release unmanaged resources
         LibVlcInterop.libvlc_log_close(descriptor);
     } finally {
         base.Dispose(isDisposing);
     }
 }