Q: Out of Memory Exception when loading large number of images through a file picker Windows Phone 8.1:
foreach (StorageFile file in ImageFiles)
            {

                ClassForFolderImages CFFI = new ClassForFolderImages();
                using(var stream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read))
                {
                 var bitmapImage = new Windows.UI.Xaml.Media.Imaging.BitmapImage();

                 bitmapImage.DecodePixelWidth = 80;
                 bitmapImage.DecodePixelHeight = 80;
                 await bitmapImage.SetSourceAsync(stream);

                 CFFI.imageForFolder = bitmapImage;

                 GridViewName.Add(CFFI);
                }
            }

in the above snippet "ImageFiles" contains a large number of Images and "GridViewName" is the name of the observable collection which I later bind to a grid view where I wish to display these Images.
The ClassForFolderImages Class is as below:
public class ClassForFolderImages : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;


    private BitmapImage img;

    public BitmapImage imageForFolder
    {
        get { return img; }

        set
        {
            img = value;
            FirePropertyChangedEvent("imageForFolder");
        }
    }


    public ClassForFolderImages()
    {

    }

    private void FirePropertyChangedEvent(string propertyName)
    {

        if (PropertyChanged != null)
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

    }

}

This Snippet works fine in the phone simulator and for small number of images on the device ,but on the device - as the number of images increase at some point it starts throwing the below error (it breaks at App.g.i.cs) :
Exception = The function evaluation was disabled because of an out of memory exception.
Handled = The function evaluation was disabled because of an out of memory exception.
Message = The function evaluation was disabled because of an out of memory exception.

Can anyone suggest changes to overcome this problem?
