public void Dispose()
        {
            for (int i = 0; i < Sizes.Length; i++)
            {
                MemoryHeap.Free(Data[i]);
            }

            MemoryHeap.Free(Data);
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_timer.Dispose();
            }

            IntPtr zero = IntPtr.Zero;

            LibVlcMethods.libvlc_video_set_callbacks(m_hMediaPlayer, zero, zero, zero, zero);

            m_pixelDataPtr.Free();
            m_pixelData.Dispose();

            MemoryHeap.Free(m_pBuffer);
        }
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                m_callbacks = null;
                if (m_queue != null && m_queue.Count > 0)
                {
                    foreach (var item in m_queue)
                    {
                        MemoryHeap.Free(item.Data.ToPointer());
                    }
                }
                m_queue = null;
            }
        }
 private void OnImemRelease(void *data, char *cookie, uint dataSize, void *pData)
 {
     try
     {
         MemoryHeap.Free(pData);
     }
     catch (Exception ex)
     {
         if (m_excHandler != null)
         {
             m_excHandler(ex);
         }
         else
         {
             throw new Exception("imem-release callback failed", ex);
         }
     }
 }
Exemple #5
0
 public void Dispose()
 {
     MemoryHeap.Free(this.pPixelData);
 }