Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Out of memory in simple ListView

$
0
0

Hi! I have a simple ListView:

<ListView x:Name="list" ItemsSource="{Binding Items}">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ImageCell 
                    Text="{Binding FileName}" 
                    ImageSource="{Binding Photo}">
                </ImageCell>
            </DataTemplate>
        </ListView.ItemTemplate>
</ListView>

Now, I have 5 items in listview. I open it, press back button, open again and get out of memory exception. What am I doing wrong?
I use this code to show photos data :ImageSource.FromStream(() => new MemoryStream(imgData), imgData is byte[]. Thank you!

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>