Re: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?

Tech-Archive recommends: Fix windows errors by optimizing your registry



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() ?


.



Relevant Pages

  • Re: What is managed code?
    ... managed code is code that the runtime system handles all ... > aspects of memory and resource management. ... But since we know that resources on any given ... > also reference counted, which means that it is possible to create two ...
    (microsoft.public.vb.general.discussion)
  • Re: What is managed code?
    ... managed code is code that the runtime system handles all ... aspects of memory and resource management. ... But since we know that resources on any given system ... the Component Object Module runtime DLLs perform a simple reference ...
    (microsoft.public.vb.general.discussion)
  • Re: dataset Performence Issue
    ... Microsoft that a DataSet is okay to abuse as a DataBase. ... Managed Code can never be as fast and as optimized ... very good for 90% of the situations i.e. normal memory usage, ... Merge/GetChanges - and oh lets not forget keeping your disconnected cache ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: dataset Performence Issue
    ... of data to hold in memory in some applications. ... Network and disk costs see to that. ... First of all, Dataset is guess what - Managed Code, and to send all the ... You need paging mechanisms etc. which are ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: using gzlib from c#
    ... I don't have a favourite memory leak finder, I'm afraid - but the main ... the kind of mistakes which can occur in interop may well ... >> The demand for the UnmanagedCode permission will still occur at link ... > piece of memory is being allocated by managed code, ...
    (microsoft.public.vc.language)