Re: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
- From: "Cor Ligthert[MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Wed, 16 Apr 2008 05:31:59 +0200
DR,
Why you call GC.Collect? It is the same practise as power down your computer after your program is done and than start again.
The benefit is the same, because with letting memory unused is nothing wrong as long as there is enough. It is better to clean it up at the right time by instance as there is not enough memory anymore or the computer is in a kind of idle state. And that is where Net is for.
So the parallel with power down your computer is no joke, it is exactly the same.
Cor
"DR" <softwareengineer98037@xxxxxxxxx> schreef in bericht news:uOkNbC0nIHA.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: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
- Next by Date: Querying a Runtime Dataset with LINQ
- Previous by thread: Re: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
- Next by thread: Re: GC.Collect() not cleaning memory, how to find out what references to lots of memory still exist?
- Index(es):
Relevant Pages
|