ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Fixed: Memory leaks after using ParamsFromFile
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Murat

Russia
48 Posts

Posted - Jan 09 2013 :  03:06:34  Show Profile  Reply
I use IEVolution/ImageEN 4.12, DCRAWLib 1.452. After running the test code below the memory taken by the test application is drastically raised: from 10MB up to 450MB.


private IEImage CachedIEImage = new IEImage();
public Form1()
{
  InitializeComponent();
  IEImage.FileFormatRemove(IEFileFormats.RAW);
  IEImage.AddExtIOPlugin(@"dcrawlib.dll");
}

private void LoadTestImage()
{
  CachedIEImage.IOParams.ResetInfo();
  string fileName = @"e:\TestImportCR2\TestCR2-1.CR2";
  CachedIEImage.LoadImageInfo(fileName, IEImage.FindFileFormat(fileName, false));
          
}

private void button1_Click(object sender, EventArgs e)
{
  for(int i = 0; i<20000; i++)
  {
    TestLoadImage();
    Text = i.ToString();
    Application.DoEvents();
  }
}

Murat

Russia
48 Posts

Posted - Jan 09 2013 :  03:25:24  Show Profile  Reply
The same result is with the Delphi sample

procedure TForm1.Button1Click(Sender: TObject);
var i : integer;
begin
  for i := 0 to 20000 do
  begin
    ImageENIO1.Params.ResetInfo();
    ImageENIO1.ParamsFromFileFormat(fileName, FindFileFormat(fileName, false));
    Caption := IntToStr(i);
    Application.ProcessMessages;
  end;

end;

begin
  IEFileFormatRemove(ioRAW);
  IEAddExtIOPlugin('dcrawlib.dll');
end.
Go to Top of Page

Murat

Russia
48 Posts

Posted - Jan 09 2013 :  03:49:39  Show Profile  Reply
Seems the problem is related to ParamsFromFile usage.
Go to Top of Page

Murat

Russia
48 Posts

Posted - Jan 13 2013 :  14:20:03  Show Profile  Reply
Fabrizio, hope you read this post. I'd be much appreciate it, to hear your opinion regarding this issue...
Go to Top of Page

fab

1310 Posts

Posted - Jan 14 2013 :  02:29:20  Show Profile  Reply
This doesn't happen in my tests. I tried several CR2 files, but maybe I haven't tried the right one.
Please could you post or send me a CR2 file which surely causes this problem?
Also, how much bytes (or MB) does it leak every cycle?
Go to Top of Page

Murat

Russia
48 Posts

Posted - Jan 15 2013 :  10:47:02  Show Profile  Reply
Thank you, Fabrizio! Your response pushed me to check the my changes in ImageEN sources. I've forgot to release a new TTIFFEnv based object (I extensively work with image metadata).

The problem is closed...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: