Re: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 Apr 2008 20:36:14 +0200
Why do you care?
The idea of managed code is that its, well, ..managed.
Even after colllection the memory may not change until more is allocated on
the heap. Unles you have a real pressing need to manage every byte, don't
worry.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"DR" <softwareengineer98037@xxxxxxxxx> wrote in message
news:eKVgKE0nIHA.2292@xxxxxxxxxxxxxxxxxxxxxxx
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() ?
.
- References:
- Prev by Date: Re: Bitmap + Clipboard + Transparency = Blue Background?
- Next by Date: How can we pass a handle to a bitmap to a C++ dll?
- Previous by thread: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
- Next by thread: How can we pass a handle to a bitmap to a C++ dll?
- Index(es):
Relevant Pages
|