we are evaluating your barcode recognition functionality at the moment (GdPicture.NET 6.7.0.0) and recognized a problem concerning the memory usage. Here is the example code:
Code: Select all
public Form1()
{
InitializeComponent();
gdImaging = new GdPicture.GdPictureImaging();
gdImaging.SetLicenseNumber("XXXX"); // Please, replace XXXX by a valid demo or commercial license key.
gdImaging.SetLicenseNumber1DBarcodeRecognition("XXXX"); // Please, replace XXXX by a valid demo or commercial license key.
}
private void button1_Click(object sender, EventArgs e)
{
int iImage;
int iCount;
int iVar;
int iBarcodeCount;
iImage = gdImaging.TiffCreateMultiPageFromFile(@"d:\work\test.tif");
iCount = gdImaging.TiffGetPageCount(iImage);
iBarcodeCount = 0;
for (iVar = 1; iVar <= iCount; iVar++)
{
gdImaging.TiffSelectPage(iImage, iVar);
gdImaging.Barcode1DReaderDoScan(iImage, GdPicture.Barcode1DReaderScanMode.BestQuality);
iBarcodeCount += gdImaging.Barcode1DReaderGetBarcodeCount();
gdImaging.Barcode1DReaderClear();
label1.Text = iVar.ToString();
label1.Refresh();
}
gdImaging.TiffCloseMultiPageFile(iImage);
gdImaging.ReleaseGdPictureImage(iImage);
MessageBox.Show(iBarcodeCount.ToString());
}
Now when the barcode recognition is executed for a few times, the memory usage of the process is continuously growing until the application crashes. This is not the case, if i comment out the barcode recognition method calls.
Are there any release- or disposal-method-calls missing or is this a bug?
Thank you in advance for your help.
Best Regards,
Eco