title: Dispose of Image in WPF in Listbox (memory leak)
body: <p>I have a ListBox with a bunch of images in it (done through a datatemplate).  The images are created by setting the items source:</p>
  
  <pre><code>&lt;Image x:Name="ItemImage" Source="{Binding ImageUrl}"/&gt; 
  </code></pre>
  
  <p>and then they are cleared by using the listbox's Items.Clear() method.  New Images are added by using the Items.Add method of the listbox. </p>
  
  <p>However, memory usage just starts moving up and up and up.  It is the same 300 or so small images that are getting displayed, but the memory never seems to get freed.  The App starts using about 40Megs, and quickly climbs up to 700Megs.  How do I free up the memory that all these images are using?</p>
  
  <p><strong>EDIT</strong>: One thing I forgot to mention, the images (which are about 4-5k each in size) are being loaded over the network.  Is caching somehow responsible for this?  Displaying 12 Images chews up about 10 Megs of memory, which is about 100X filesize.</p>