 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ma Guest
|
Posted: Tue Jun 08, 2004 9:33 pm Post subject: How do I get Windows to free the memory after creating and f |
|
|
I have a small program that loads images automatically from a directory,
resizes them and saves them to another file
Although I free the bitmap and set its size to zero it is still taking up
vast amounts of memory in windows.
It is only when the program is closed down that the memory is free.
Any help would be appreciated
thanks
try
tbmp:=frmimage.LoadImage(
edtdir.text+''+li.subitems[0]);
nw:=strtoint(trim(newwidth.text));
nh:=strtoint(trim(newheight.text));
try
if chkaspect.Checked then begin
MainPImage:=frmImage.ResizeImage(tbmp,nw,0,true);
end else begin
MainPImage:=frmImage.ResizeImage(tbmp,nw,nh,false);
end; {if height & width chosen}
MainPImage.Dormant;
tbmp.Dormant;
finally
tbmp.Width:=0;
tbmp.Height:=0;
tbmp.FreeImage;
application.ProcessMessages;
tbmp.Free;
end; {try finally}
application.ProcessMessages;
finally
MainPImage.Width:=0;
MainPImage.Height:=0;
MainPImage.FreeImage;
MainPImage.Free;
application.ProcessMessages;
end; {try finally}
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|