As I replied in another NG. GC.Collect should only be used in the most
memory intensive applicaitons. In practice, its use is not recommended.
-Scott
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:bb**********************************@24g2000h sh.googlegroups.com...
On Apr 16, 1:08 am, Tom Shelton
<tom_shel...@YOUKNOWTHEDRILLcomcast.netwrote:
On 2008-04-15, DR <softwareengineer98...@yahoo.comwrote:
GC.Collect() not cleaning memory, how to find out what references to
lots of
memory still exist?
When all my processign is done i set everything to null and then:
GC.Collect()
and then
GC.WaitForPendingFinalizers()
but it still shows that my process takes 400 MB of memory. Is there any
easy
way to see what references that I forgot to set to null so that the
memory
cleas up on GC.Collect() ?
Where are you seeing that? In the task manager? If so, then you are
looking in the wrong place. Let me tell you a little something about
windows memory management - just because memory is freed, does not mean
that the OS instantly removes it from your process.
You need to be looking at the performance counters for this - to find
out the actuall amount of memory your using....
--
Tom Shelton
Hi,
Recently, i downloaded a small GDI+ article about graphics, then first
ran without looking source code, then what's that! My more than 500MB
free memory was about to become out. Then i found out that the problem
was using GC.SuppressFinalize before GC.Collect, removing
GC.SuppressFinalize and lines about finalizing which solved the
problem and GC.Collect was working good after this removal.
Maybe that would be your problem,
Hope this helps,
Onur Guzel