@Override public void onDestroy() { super.onDestroy(); if (mLoader != null) { mLoader.cancelLoad(); } // the mObjects field is accessed by the background loader synchronized (this) { if (mObjects != null) { ((ObjectListCursorAdapter) mObjects).closeCursor(); } } }