コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the Image class
 /// </summary>
 public Image()
 {
     this.faceTrackingImagePtr = NativeMethods.FTCreateImage();
     if (this.faceTrackingImagePtr == null)
     {
         throw new InvalidOperationException("Cannot create image instance");
     }
 }
コード例 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (this.faceTrackingImagePtr != null)
                {
                    Marshal.FinalReleaseComObject(this.faceTrackingImagePtr);
                    this.faceTrackingImagePtr = null;
                }

                this.disposed = true;
            }
        }