title: 'Catching' OutOfMemoryError completely solves out-of-memory issue?
body: <p>I was getting <i>OutOfMemoryError</i> messages in LogCat and my app was crashing because the errors were uncaught.<br><br>
  Two things were causing the <i>OutOfMemoryError</i>:<br>
  1. Reading a large text file into a string.<br>
  2. Sending that string to my TextView.<br><br>
  Simply adding a catch to these two things not only catches the <i>OutOfMemoryError</i> but appears to completely solve the out-of-memory problem.<br>
  No more crashing and no more error messages in LogCat. The app just runs perfectly.<br><br>
  How is this possible? What exactly is happening?
  <br>
  <br>
  <br></p>
  
  <p><b>With this code, I was getting the error messages &amp; app crashing:</b></p>
  
  <pre><code>try
  {
  myString = new Scanner(new File(myFilePath)).useDelimiter("\\A").next();
  } 
  catch (FileNotFoundException e) 
  {
  e.printStackTrace();
  }
  
  
  myTextView.setText(myString);
  </code></pre>
  
  <p><br>
  <br></p>
  
  <p><b>Just by 'catching' the <i>OutOfMemoryError</i>, no more error messages in LogCat and no crashing:</b></p>
  
  <pre><code>try
  {
  myString = new Scanner(new File(myFilePath)).useDelimiter("\\A").next();
  } 
  catch (FileNotFoundException e) 
  {
  e.printStackTrace();
  }
  catch(OutOfMemoryError e)
  {
  }
  
  
  try 
  {
  myTextView.setText(myString);
  } 
  catch(OutOfMemoryError e)
  {
  }
  </code></pre>