title: Background sticky concurrent mark sweep GC freed and app crashes - android
body: <p>When sending some data to server, the below method rises more,</p>
  
  <pre><code>I/art﹕ Background sticky concurrent mark sweep GC freed 45388(3MB) AllocSpace objects, 17(292KB) LOS objects, 14% free, 10MB/11MB, paused 20.543ms total 209.212ms
  I/art﹕ Background partial concurrent mark sweep GC freed 66026(4MB) AllocSpace objects, 27(616KB) LOS objects, 28% free, 9MB/13MB, paused 2.454ms total 246.055ms
  I/art﹕ Background sticky concurrent mark sweep GC freed 42923(3MB) AllocSpace objects, 14(236KB) LOS objects, 20% free, 11MB/13MB, paused 3.247ms total 143.983ms
  W/art﹕ Suspending all threads took: 7.054ms
  </code></pre>
  
  <p><strong>MyClass.Java</strong></p>
  
  <pre><code>private static synchronized void saveToServer(final MyClass myclass) throws JSONException {
  User currentUser = MainActivity.getUser();
  HashMap&lt;String, Object&gt; params = new HashMap&lt;String, Object&gt;();
  params.put(“name”, myclass.getname());
  // …. other params.put(....)
  try {
  HttpClientUtils.postRequestWithCallback(SAVE_URL, params, SignatureType.SIG_SEC, new HttpClientUtils.CustomCallbackListener(){
  @Override
  public void onSuccess(JSONObject jsonObject) {
  myclass.setSaved(true);
  }
  });
  }catch (Exception e){
  }
  }
  </code></pre>