title: A first chance exception of type 'System.OutOfMemoryException' occurred in System.Windows.ni.dll
body: <p>I am writing a windows phone 8 application.
  I am seeing the following error:
  A first chance exception of type 'System.OutOfMemoryException' occurred in System.Windows.ni.dll
  I have zoned the code that causes this error, but i am not able to fix it. Feel free to help me out here</p>
  
  <pre><code>public void getTheWholeChapter(string startbooknum, string startchapter)
      {
          System.Uri uri = new Uri("http://api.seek-first.com/v1/BibleSearch.php?type=lookup&amp;appid=seekfirst&amp;startbooknum=" + startbooknum + "&amp;startchapter=" + startchapter + "&amp;startverse=1&amp;endbooknum=" + startbooknum + "&amp;endchapter=" + startchapter + "&amp;endverse=5000000&amp;version=KJV");
          WebClient client = new WebClient();
          OpenReadCompletedEventHandler orceh = new OpenReadCompletedEventHandler(GetTheData);
          client.OpenReadCompleted += orceh;
          client.OpenReadAsync(uri);
      }
  
      private void GetTheData(object sender, OpenReadCompletedEventArgs e)
      {
          if (e.Error == null)
          {
              StreamReader reader = new StreamReader(e.Result);
              string stringXML = reader.ReadToEnd().ToString();
  
              ListBox tb = new ListBox();
              //tb.IsGroupingEnabled = true;
              //tb.HideEmptyGroups = true;
              //tb.LayoutMode = LongListSelectorLayoutMode.List;
              tb.FontSize = 25;
              List&lt;TextBlock&gt; listOfVerses = new List&lt;TextBlock&gt;();
  
  
  
              //get the deatails from the 
              if (stringXML != "" &amp;&amp; stringXML != null)
              {
                  XDocument root = XDocument.Parse("&lt;Document&gt;" + stringXML.Replace("&gt;&lt;/a&gt;", "/&gt;&lt;/a&gt;") + "&lt;/Document&gt;");
                  var ResultsX = from Results in root.Descendants("Result")
                                 select Results;
                  foreach (var Result in ResultsX)
                  {
                      listOfVerses.Add(new TextBlock()
                      {
                          Text = Result.Element("Chapter").Value + ":" + Result.Element("Verse").Value + "  " + Result.Element("Text").Value,
                          TextWrapping = TextWrapping.Wrap,
  
                      });
                  }
              }
              tb.ItemsSource = listOfVerses;
              ((PivotItem)this.chaptersPivot.Items[chaptersPivot.SelectedIndex]).Content = tb;
  
          }
          else
          {
              //handle this
          }
          //throw new NotImplementedException();
      }
  </code></pre>