/// <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"); } }
protected virtual void Dispose(bool disposing) { if (!this.disposed) { if (this.faceTrackingImagePtr != null) { Marshal.FinalReleaseComObject(this.faceTrackingImagePtr); this.faceTrackingImagePtr = null; } this.disposed = true; } }