title: Memory problems(?) cause crash
body: <p>I've got an activity, where I initialize some static variable (Menu of the app). In another activity I use these variable in some if-clauses. </p>
  
  <p>If I am in the 2nd activity and press "Home" button to get the app to the background and resume it after a few minutes or immediately the app will still work. If I wait for about 10 minutes before resumeing it crashs.</p>
  
  <p>The smartphone I was using has got many widgets and apps, which will refresh automatically. Because of that I think the variable got deleted from the memory, because it gets full. If I resume the app will crash at a point, where I am just using an if-clause like:</p>
  
  <pre><code>if(couldBeTrue){
  //do something
  }
  </code></pre>
  
  <p>I can't conceive to another idea which could cause this problem. </p>
  
  <p>Do you think my assumption is correct? What is the best way to debug it?</p>
  
  <hr>
  
  <p>Edit:
  I am sorry for the poor information. I give it another try.</p>
  
  <p>I've got 3 Class:</p>
  
  <p>OpenFeintApp extends Application:
  starts everytime I start or resume the App (only contains variable and some code for OpenFeint)</p>
  
  <p>MenuActivity extends Activity:
  This activity is the launcher activity. Contains the needed static variable. Those variable are for settings. And there are some final static variable, which I change to be able to export different versions easily.</p>
  
  <pre><code>public final static boolean EXTRA_CONTENT_ONE = false;
  public final static boolean EXTRA_CONTENT_TWO = true;
  public final static boolean EXTRA_CONTENT_THREE = false;
  
  public static int SETTINGS_ONE = 3;
  public static int SETTINGS_TWO = 0;
  public static int SETTINGS_THREE = 1;
  public static int SETTINGS_FOR = 5;
  </code></pre>
  
  <p>(will not be called if I resume the app after I pause the app while playing in GameActivity)</p>
  
  <p>GameActivity extends Activity (AdMob integrated):
  Won't crash after resume if I resume after a few minutes. (Galaxy S, which refresh pretty much things automatically) Will crash if I pause this activity and resume it after about 10 minutes. Before this activity resumes OpenFeintApp will be called.</p>
  
  <p>I got a NullPointerException at this point:</p>
  
  <pre><code>if (MenuActivity.EXTRA_CONTENT_ONE) //This variable is false
  </code></pre>