I have a long running WPF application; users start the application and keep it open for at least 6 hours straight.
I spend a couple days with a Memory Profiler, solving a couple of memory leaks.
According to the Memory Profiler, all is good now.
However, when I run the application, and monitor the Memory in the Windows Task Manager, it only seems to grow.
When I create a button to force the garbage collection (GC.Collect()), a lot of memory is freed from the app.
1. I don't feel like it's a good idea to call GC.Collect() explicitly; is there any case where it is advised to do so?
2. Is it normal that it takes WPF that long to start garbage collecting automatically?
View Complete Post