I have an Image
in a ScrollViewer
and I'm changing the BitmapImage
that's the Source of the Image from time to time. I've discovered that the App's memory usage surpasses 2GB even though the images are only around a total of 100MB! (I didn't know more than 2GB can ever be allocated to one app) And sometime it crashes. The memory usage does get smaller every so often, but not fast enough. My assumption (due to lack of a better one, any other ideas are welcome) is that the ScrollViewer is caching the images and does not release that cache even after the BitmapImage is replaced by another one.
Is there a way to tell the ScrollViewer not to cache the images?
Additionally, how can I check where is the memory going to? I'm using VS2015, and all that Diagnostic Tools shows me is the total memory used.