3
votes

I made a test application:

https://dl.dropbox.com/u/16063542/TestImageMemory.zip

It consists of three pages:

  1. Starting page.

  2. Page showing a list of images using ListBox

  3. Page showing a list of images using LongListSelector

The same images, the same DataTemplate on pages 2,3:

<DataTemplate>
                    <Grid Height="300">
                        <Image local:LowProfileImageLoader.UriSource="{Binding}" />
                    </Grid>
                </DataTemplate>

I'm using LowProfileImageLoader which everybody who developed anything for WP is aware of.

Now, I'm performing a test:

  • start app.

  • go to to a ListBoxPage and back 20 times.

Memory consumption doesn't increase and stays at appx. 50 mb level.

Then I do the same with the LongListSelector page.

App crashes on 13th navigation.

Does anybody know what is the problem?

2

2 Answers

0
votes

The problem is apparently in your LowProfileImageLoader. Just throw it away and everything will work fine. I've just checked your app without it, and memory consumption doesn't get above 50 megs on LongListSelector page as well.

0
votes

So far the only input from Microsoft I got on this matter: do not use WP8 LongListSelector.