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
 ImageEN holding onto RAM

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
adyble Posted - Mar 10 2025 : 05:48:07
We are scanning like this.

ImageEnView1.IO.SaveToStream(ImageStream, ioJPEG);

We then insert that stream into a database record.

When we close the form, the RAM usage that’s increased form the scan has not decreased. So the next time we open the form and scan, it just carries on adding to the RAM usage until it crashes.

We’ve naturally done - FreeAndNil( ImageStream );

We can destroy the ImageEN component but then get access vilations.

Is there a way to clear the memory uised by the image after its used?

Thanks

Andy

I tried you suggestion -ImageEnView1.Blank ; I put in form.close
However, from the on, until the application is restarted the ImageEnView1 is turned off and doesn't show anyting or allow scanning .

Andy
4   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 17 2025 : 22:14:59
Sorry, I'm not sure what you are seeing there and I suspect it is not related to ImageEn.

Are you able to create a small demo that reproduces the issue (with no database dependencies)?

Nigel
Xequte Software
www.imageen.com
adyble Posted - Mar 17 2025 : 05:19:41
the only way we could free the RAM was using
MainHandle := OpenProcess(PROCESS_ALL_ACCESS, false, GetCurrentProcessID) ;
SetProcessWorkingSetSize(MainHandle, $FFFFFFFF, $FFFFFFFF) ;
CloseHandle(MainHandle);
adyble Posted - Mar 11 2025 : 04:45:07
Yes, the form is freed with FreeAndNil


We are going to test without the database, so just keep loading images into the view and see if it changes.
xequte Posted - Mar 10 2025 : 19:42:49
Hi Andy

So the TImageEnView is in a sub-form? Do you free that form after usage, or is it only created once?

I can't see why ImageEnView1Blank() should prevent scanning from working. Try calling ImageEnView1.Update() after scanning (as a test, it should not actually be needed).


Nigel
Xequte Software
www.imageen.com