Click to See Complete Forum and Search --> : Memory shootout in C#


rakeshsahu
December 29th, 2003, 04:07 AM
Hi
I am using a C# windows application which has got three threads running in background.
One Thread keep on loggin data to disk at a very high rate.
approx 20 files per second.

Another threads generates data in memory and then logs the same to disk after every minute.

When this entire application is happening the memory of the app reaches to 300 to 400 mb within 10 minutes.
Also when the process is compltete and the objects are dropped out even then memory is not released.

Any idea as why memory is shooting and is there any memory leak in my app>

ITGURU
December 30th, 2003, 12:57 AM
Dear Rakesh,

In Dot net if you writing any process which takes lots of memory then it will be better to set all object to null after there use and call GC to collect unused memory by calling GC.COLLECT() method.

Because in Dot Net memory collection depend on your resource availablity in your machine when new objects instance is required to be created.

Hope this will solve your problem.