public void DisposeImage() { if (LocalPix != null) { LocalPix.Dispose(); } Clear(); ClearPersistentCache(); ClearAdaptiveClassifier(); }
public void Dispose() { if (handleRef.Handle != null && handleRef.Handle != IntPtr.Zero) { if (localPix != null) { localPix.Dispose(); } Clear(); ClearAdaptiveClassifier(); End(); ClearPersistentCache(); Native.DllImports.TessBaseAPIDelete(handleRef); } }
private void OnPageDisposed(object sender, System.EventArgs e) { page.Disposed -= OnPageDisposed; // dispose the pix when the page is disposed. pix.Dispose(); }