Background: I have a c# winform application that loads images every second and disposes them when they are not needed anymore.
I noticed in the task manager that the app fluctuates in memory use every few minutes. For example: the app will run at 14.1MB -> 14.2MB -> 14.3MB...some time passes...16.3MB....
Then 5 minutes later from 16.3MB the memory usage fluctuate like this: 16.3MB -> 25.3MB -> 16.1MB -> 25.2MB and will continue this pattern for 10 to 15 seconds before leveling out again at 14.0MB.
Sometimes I noticed the memory will also fluctuate down. For example: 14.6MB -> 10.4MB -> 14.7MB -> 11.5MB and so on for several seconds before leveling out again.
I know it is hard to say what the issue is without seeing the code but what would make this occur? Is this the GC running? Is it a memory leak? Is it something I should be worried about or does this happen often during application run-time? The app can run for several hours without crashing so it makes me wonder what is going on. I haven't ran it over 9 hours so I don't know what would happen then.
Let me know what you guys think and I appreciate any thoughts on the matter.
Thanks.