Beispiel #1
0
        public override void Dispose(bool disposing)
        {
            if (myVlcInstance != null)
            {
                myVlcInstance.Dispose();
            }

            if (MyAllInstance.ContainsValue(this))
            {
                foreach (var kv in new Dictionary <DirectoryInfo, VlcManager>(MyAllInstance))
                {
                    if (kv.Value == this)
                    {
                        MyAllInstance.Remove(kv.Key);
                    }
                }
            }

            if (this.dialogCallbacksPointer != IntPtr.Zero)
            {
                Marshal.FreeHGlobal(this.dialogCallbacksPointer);
            }

            base.Dispose(disposing);
        }
 public void Dispose()
 {
     if (this.dialogCallbacksPointer != IntPtr.Zero)
     {
         Marshal.FreeHGlobal(this.dialogCallbacksPointer);
     }
     myVlcInstance.Dispose();
     VlcLibraryLoader.ReleaseLoader(this.myLibraryLoader);
 }
Beispiel #3
0
        public override void Dispose(bool disposing)
        {
            if (myVlcInstance != null)
            {
                myVlcInstance.Dispose();
            }

            if (myAllInstance.ContainsValue(this))
            {
                foreach (var kv in new Dictionary <DirectoryInfo, VlcManager>(myAllInstance))
                {
                    if (kv.Value == this)
                    {
                        myAllInstance.Remove(kv.Key);
                    }
                }
            }
            base.Dispose(disposing);
        }