Beispiel #1
0
        public V2DepthFrame(IDepthFrameReader reader, IntPtr handle)
        {
            try
            {
                _data = reader.GetFrameArrivedEventData(handle);
                _reference = _data.get_FrameReference();

                SetFrame(_reference.AcquireFrame());
            }
            catch (COMException)
            {
                Dispose();
            }
        }
Beispiel #2
0
        public V2DepthFrame(IDepthFrameReader reader, IntPtr handle)
        {
            try
            {
                _data      = reader.GetFrameArrivedEventData(handle);
                _reference = _data.get_FrameReference();

                SetFrame(_reference.AcquireFrame());
            }
            catch (COMException)
            {
                Dispose();
            }
        }
Beispiel #3
0
 protected override void OnDispose()
 {
     if (_description != null)
     {
         Marshal.ReleaseComObject(_description);
         _description = null;
     }
     if (_frame != null)
     {
         Marshal.ReleaseComObject(_frame);
         _frame = null;
     }
     if (_reference != null)
     {
         Marshal.ReleaseComObject(_reference);
         _reference = null;
     }
     if (_data != null)
     {
         Marshal.ReleaseComObject(_data);
         _data = null;
     }
 }
Beispiel #4
0
 protected override void OnDispose()
 {
     if (_description != null)
     {
         Marshal.ReleaseComObject(_description);
         _description = null;
     }
     if (_frame != null)
     {
         Marshal.ReleaseComObject(_frame);
         _frame = null;
     }
     if (_reference != null)
     {
         Marshal.ReleaseComObject(_reference);
         _reference = null;
     }
     if (_data != null)
     {
         Marshal.ReleaseComObject(_data);
         _data = null;
     }
 }