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

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

                SetFrame(_reference.AcquireFrame());
            }
            catch (COMException)
            {
                Dispose();
            }
        }
예제 #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;
     }
 }
예제 #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;
     }
 }