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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Fixed: Memory leaks after using ParamsFromFile

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Murat Posted - Jan 09 2013 : 03:06:34
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();
  }
}
5   L A T E S T    R E P L I E S    (Newest First)
Murat Posted - Jan 15 2013 : 10:47:02
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...
fab Posted - Jan 14 2013 : 02:29:20
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?
Murat Posted - Jan 13 2013 : 14:20:03
Fabrizio, hope you read this post. I'd be much appreciate it, to hear your opinion regarding this issue...
Murat Posted - Jan 09 2013 : 03:49:39
Seems the problem is related to ParamsFromFile usage.
Murat Posted - Jan 09 2013 : 03:25:24
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.