title: How to solve memory consumption in windows phonw 8
body: <p>I have been working on a WP8 app, it's image gallery app,,Here I have been using pivot control &amp;list box to collect Camera Roll images(dynamically) from the device  and swipe one by one,it is working fine But I found app's memory consumption is raising and How to resolve this?</p>
  
  <p>I am trying to figure out how to code a program where I have an list of images, where only one image is shown at a time, but the adjacent images are preloaded but not visible. After each flick, the now current image animates itself over to the visible area, and the adjacent images are updated, but not visible until the next flick in either direction. I only want to have 3 'boxes'(cycle),consisting of the image to the left, current image on screen, and the image to the right. If revolving to the right, the current image becomes the left image, the image to the right becomes the current image, and the next image is preloaded but not visible.</p>
  
  <p>Example:</p>
  
  <p>First image you see is when the app is loaded. It's essentially the first image in the List box .Call it (Image 1).</p>
  
  <p>You cannot flick to the left, as no image is there. But the image to the right of it (not visible yet) is already preloaded and ready to slide when the flick is registered. (image 2)</p>
  
  <p>So if we flick to the right, Image 1 is to the left of the now visible and centered Image 2. Image 3 is now to the right, not visible but preloaded. Image 1 is now to the left, not visible but preloaded.</p>
  
  <p>**I only want to have 2 things preloaded now, so you can imagine 3 slots. One slot is the left picture. One slot is the current view, and one slot on the right.</p>
  
  <p>The idea is to be able to have a carousel of images, but only preloading the images to the left and right of the current view.</p>