// Remember to notify private void updateLazyList() { LazyList<DraftRaw> lazyList = DB.getDraftLazyList(); if (mLazyList != null) { mLazyList.close(); } mLazyList = lazyList; }
@Override protected void onDestroy() { super.onDestroy(); if (mRecyclerViewSwipeManager != null) { mRecyclerViewSwipeManager.release(); mRecyclerViewSwipeManager = null; } if (mRecyclerViewTouchActionGuardManager != null) { mRecyclerViewTouchActionGuardManager.release(); mRecyclerViewTouchActionGuardManager = null; } if (mRecyclerView != null) { mRecyclerView.setItemAnimator(null); mRecyclerView.setAdapter(null); mRecyclerView = null; } if (mWrappedAdapter != null) { WrapperAdapterUtils.releaseAll(mWrappedAdapter); mWrappedAdapter = null; } mAdapter = null; mLayoutManager = null; if (mLazyList != null) { mLazyList.close(); } }