M
MuZZy
Hi,
I got a situation here
an dwonder if someone can help me.
I have an MDI app and say, the child form has a button, clicking on which calls a database
transaction - grabbing a lot of tables to the form's TDataSet variable. One transaction grabs about
10 or more Mb of data.
If i do several transactions, the memory occupied by the app goes say goes up to 180Mb - i watch it
in Task Manager.
Now i close the child form, and ChildForm.Dispose calls DataSet.Dispose(). Nothing happens, memory
allocated is still 180 Mb.
On the Parent MDI form i cick a menu option calling GC.Collect(). Again, nothing changes... still 180Mb
Now i leave the program running 'idle' (app does nothing) and i start doing some charts in Excel and
Word for some other project. Suddenly in about 5 min i look at Task Manager and bummmm - my running
application now occupies only 5(five!!!) MB of memory... instead of 180 Mb
I realize that garbage collection doesn't do the job right away, but only when it considers it
nessesary, but is there a way to force it somehow? We have clients complaining that program is
crashing on them because of insufficient memory when they do many transactions.
Any suggestions would be highly appreciated!!!
Thank you,
Andrey
I got a situation here

I have an MDI app and say, the child form has a button, clicking on which calls a database
transaction - grabbing a lot of tables to the form's TDataSet variable. One transaction grabs about
10 or more Mb of data.
If i do several transactions, the memory occupied by the app goes say goes up to 180Mb - i watch it
in Task Manager.
Now i close the child form, and ChildForm.Dispose calls DataSet.Dispose(). Nothing happens, memory
allocated is still 180 Mb.
On the Parent MDI form i cick a menu option calling GC.Collect(). Again, nothing changes... still 180Mb
Now i leave the program running 'idle' (app does nothing) and i start doing some charts in Excel and
Word for some other project. Suddenly in about 5 min i look at Task Manager and bummmm - my running
application now occupies only 5(five!!!) MB of memory... instead of 180 Mb
I realize that garbage collection doesn't do the job right away, but only when it considers it
nessesary, but is there a way to force it somehow? We have clients complaining that program is
crashing on them because of insufficient memory when they do many transactions.
Any suggestions would be highly appreciated!!!
Thank you,
Andrey