title: Are Android Static References Strong
body: <p>I have a singleton that I'd like to keep alive for the lifetime of an <a href="http://developer.android.com/reference/android/app/Application.html" rel="nofollow"><code>Application</code></a>.</p>
  
  <pre><code>public final class KeepAlive extends Whatever {
      private KeepAlive() {}
  
      private static class Singleton {
          private static final KeepAlive instance = new KeepAlive();
      }
  }
  </code></pre>
  
  <p>Is <code>Singleton.instance</code> considered a strong reference, so that it will not get GC'ed?</p>
  
  <p><strong>UPDATE:</strong> Does Android use a custom classloader? Is so, would it ever unload a class like <code>KeepAlive</code> or <code>Singleton</code>?</p>