2

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?

petko_stankoski
  • 10,459
  • 41
  • 127
  • 231
  • 1
    possible duplicate of [WPF Image control memory leak](http://stackoverflow.com/questions/13611421/wpf-image-control-memory-leak) – stukselbax Nov 23 '14 at 15:39
  • @stukselbax Did you ever fix this? I'm having the same problem. Loading 18 BitmapImages puts me at 1GB of memory. Is there a good way to only load the image in memory when it is displayed? – AndrewRalon Jul 24 '15 at 17:12

0 Answers0