How to make MODI.Document not leak memory? I have millions of images to OCR but each time i OCR one

D

DR

How to make MODI.Document not leak memory? I have millions of images to OCR
but each time i OCR one it leaks memory. How to do the OCR and then clean up
so that my app doesnt leak memory?

MODI.Document miDoc = new MODI.Document();
for (int i = 0; i < 1000; i++)
{
miDoc.Create("a.gif");
miDoc.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, true, true);
MODI.Image tifImg = (MODI.Image)miDoc.Images[0];
string recSTring = tifImg.Layout.Text;
miDoc.Images.Remove(tifImg);
miDoc.Close(false);
}
int i23z = 23 + 23;
miDoc.Close(false);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top