I have a wpf app in which I show a lot of images. When I debug in C# the memory usage is fine and when I press on F5 to continue the execution of the program which happens not in my code, the memory usage increases a lot. I commented the code for the images and the memory usage is fine. The conclusion is - the images cause the memory leaks.
My images are in an itemscontrol. They are binded from a view-model. I've tried binding them as a simple URL and as BitmapImages and the memory usage is huge with both of them.
I've enabled visualization and no improvements. What can I do to make the memory usage smaller?