Memory Issue
-
Ok here is the scenario. I have an automated process manager that I am running, it is polling using the timer class every 10 minutes to see if something needs to be run. If the window is FormWindowState.Normal the memory is between 11 - 21 meg which is fine, when I minimize the window it drops memory useage to around 600k, which is great. However if I try to run GC after a poll and successful process run, the memory doesn't seem to get collected no matter what I try. I would expect memory to realease to at least 3 - 4 meg once the process is completed however when I call GC this doesnt happen, if I manually minimize the display the memory releases down to 600 - 800k. So I dont think I have references in place that should be there, its almost like GC doesnt fire until I minimize. Any thoughts?
-
Ok here is the scenario. I have an automated process manager that I am running, it is polling using the timer class every 10 minutes to see if something needs to be run. If the window is FormWindowState.Normal the memory is between 11 - 21 meg which is fine, when I minimize the window it drops memory useage to around 600k, which is great. However if I try to run GC after a poll and successful process run, the memory doesn't seem to get collected no matter what I try. I would expect memory to realease to at least 3 - 4 meg once the process is completed however when I call GC this doesnt happen, if I manually minimize the display the memory releases down to 600 - 800k. So I dont think I have references in place that should be there, its almost like GC doesnt fire until I minimize. Any thoughts?
-
Ok here is the scenario. I have an automated process manager that I am running, it is polling using the timer class every 10 minutes to see if something needs to be run. If the window is FormWindowState.Normal the memory is between 11 - 21 meg which is fine, when I minimize the window it drops memory useage to around 600k, which is great. However if I try to run GC after a poll and successful process run, the memory doesn't seem to get collected no matter what I try. I would expect memory to realease to at least 3 - 4 meg once the process is completed however when I call GC this doesnt happen, if I manually minimize the display the memory releases down to 600 - 800k. So I dont think I have references in place that should be there, its almost like GC doesnt fire until I minimize. Any thoughts?
well you cant really force the GC to run your just asking it to. implement the dispose method on those references and set them to null so you can force the release. make sure no other object holds a reference to it or it will not release. Much like the old com refernece counter. nick I'm not an expert yet, but I play one at work. Yeah and here too.