This question is locked. New answers and comments are not allowed.
I'm using the RadTransitionControl to animate between photos. Every 3 seconds the folowing code runs:
Content.Content = new Image() { Source = new BitmapImage(Images[currentImageNumber]), Stretch = ImageStretch };
(Content is the RadTransitionControl and Images is an array of URIs)
After 5 minutes of running this code the app crashes with an OutOfMemoryException. Seems the image is not being disposed after a new Image has been assigned as content.
Changing the content to null before changing the image doesn't look great but it stops the OutOfMemoryException exception occurring:
Content.Content = null;
Content.Content = new Image() { Source = new BitmapImage(Images[currentImageNumber]), Stretch = ImageStretch };
Content.Content = new Image() { Source = new BitmapImage(Images[currentImageNumber]), Stretch = ImageStretch };
(Content is the RadTransitionControl and Images is an array of URIs)
After 5 minutes of running this code the app crashes with an OutOfMemoryException. Seems the image is not being disposed after a new Image has been assigned as content.
Changing the content to null before changing the image doesn't look great but it stops the OutOfMemoryException exception occurring:
Content.Content = null;
Content.Content = new Image() { Source = new BitmapImage(Images[currentImageNumber]), Stretch = ImageStretch };