Unbind the adapter and layoutManger to recyclerView. And also set null to them.
15731
public void unbindView() {
        if (mContentView != null) {
            this.mContentView.setAdapter(null);
            this.mContentView.setLayoutManager(null);
            this.mContentView = null;
        }
    }
214069
private void removeAnimatingView(View view) {
        if (mNumAnimatingViews > 0) {
            for (int i = mAnimatingViewIndex; i < getChildCount(); ++i) {
                if (getChildAt(i) == view) {
                    removeViewAt(i);
                    --mNumAnimatingViews;
                    if (mNumAnimatingViews == 0) {
                        mAnimatingViewIndex = -1;
                    }
                    mRecycler.recycleView(view);
                    return;
                }
            }
        }
    }
1095895
public final <T> void unbindFrom(Class<T> clazz, T object) throws ObjectNotAssociatedException {
        LifecycleManagerStore.getCurrentStore().unbind(this, clazz, object);
    }
1337038
@Nullable
    public Item getItem(RecyclerView.ViewHolder viewHolder) {
        FastAdapter<Item> adapter = getFastAdapter(viewHolder);
        if (adapter == null) {
            return null;
        }
        //we get the adapterPosition from the viewHolder
        int pos = adapter.getHolderAdapterPosition(viewHolder);
        //make sure the click was done on a valid item
        if (pos != RecyclerView.NO_POSITION) {
            //we update our item with the changed property
            return adapter.getItem(pos);
        }
        return null;
    }
1025912
private void recycleViewHolders(boolean isRecycleAll) {

        if (mAdapter == null) {
            return;
        }

        final List<Integer> headerKeysToRemove = new ArrayList<>();

        // item view holders
        for (ViewHolder holder : mViewHolders.getAll()) {
            if (holder != null && !holder.isDragging()) {
                View view = holder.getItemView();
                // recycle view holder
                if (isRecycleAll
                        || (view.getRight() < 0
                        || view.getLeft() > mSettings.getLayoutWidth()
                        || view.getBottom() < 0
                        || view.getTop() > mSettings.getLayoutHeight())) {
                    // recycle view holder
                    mViewHolders.remove(holder.getRowIndex(), holder.getColumnIndex());
                    recycleViewHolder(holder);
                }
            }
        }
        if (!headerKeysToRemove.isEmpty()) {
            headerKeysToRemove.clear();
        }
        // column header view holders
        for (int count = mHeaderColumnViewHolders.size(), i = 0; i < count; i++) {
            int key = mHeaderColumnViewHolders.keyAt(i);
            // get the object by the key.
            ViewHolder holder = mHeaderColumnViewHolders.get(key);
            if (holder != null) {
                View view = holder.getItemView();
                // recycle view holder
                if (isRecycleAll
                        || view.getRight() < 0
                        || view.getLeft() > mSettings.getLayoutWidth()) {
                    headerKeysToRemove.add(key);
                    recycleViewHolder(holder);
                }
            }
        }

        removeKeys(headerKeysToRemove, mHeaderColumnViewHolders);

        if (!headerKeysToRemove.isEmpty()) {
            headerKeysToRemove.clear();
        }
        // row header view holders
        for (int count = mHeaderRowViewHolders.size(), i = 0; i < count; i++) {
            int key = mHeaderRowViewHolders.keyAt(i);
            // get the object by the key.
            ViewHolder holder = mHeaderRowViewHolders.get(key);
            if (holder != null && !holder.isDragging()) {
                View view = holder.getItemView();
                // recycle view holder
                if (isRecycleAll
                        || view.getBottom() < 0
                        || view.getTop() > mSettings.getLayoutHeight()) {
                    headerKeysToRemove.add(key);
                    recycleViewHolder(holder);
                }
            }
        }

        removeKeys(headerKeysToRemove, mHeaderRowViewHolders);
    }
1323085
def clear_layout(layout: QLayout) -> None:
    """"""
    if layout is not None:
        while layout.count():
            item = layout.takeAt(0)
            widget = item.widget()
            if widget is not None:
                widget.deleteLater()
            else:
                clear_layout(item.layout())
458935
private static void cancelDestroyService() {
        Thread thread = DESTROY_THREAD;
        if (thread != null) {
            DESTROY_THREAD = null;
            thread.interrupt();
        }
    }
32218
public void dispose() {
        Logger.d("Disposing.");
        mSetupDone = false;
        if (mServiceConn != null) {
            Logger.d("Unbinding from service.");
            if (mContext != null) mContext.unbindService(mServiceConn);
            mServiceConn = null;
            mService = null;
            mPurchaseListener = null;
        }
    }
1266785
@Override
    public void onDestroyView() {
        mHandler.removeCallbacks(mRequestFocus);
        mList = null;
        mListShown = false;
        mEmptyView = mProgressContainer = mListContainer = null;
        mStandardEmptyView = null;
        super.onDestroyView();
    }
162888
private void adaptItemTypeface() {
        if (adapter != null && itemTypeface != null) {
            RecyclerView.Adapter<?> wrappedAdapter = adapter.getWrappedAdapter();

            if (wrappedAdapter instanceof ArrayRecyclerViewAdapter) {
                ((ArrayRecyclerViewAdapter) wrappedAdapter).setItemTypeface(itemTypeface);
            }
        }
    }
156766
public void destroy() {
        if (mContentView != null) {
            if (mGroupBasicAdapter != null) {
                mGroupBasicAdapter.destroy();
            }
            mContentView.setAdapter(null);
            mContentView = null;
        }
        TimerSupport timerSupport = getService(TimerSupport.class);
        if (timerSupport != null) {
            timerSupport.clear();
        }
        SimpleClickSupport simpleClickSupport = getService(SimpleClickSupport.class);
        if (simpleClickSupport != null) {
            simpleClickSupport.destroy();
        }
        ExposureSupport exposureSupport = getService(ExposureSupport.class);
        if (exposureSupport != null) {
            exposureSupport.destroy();
        }
        BusSupport busSupport = getService(BusSupport.class);
        if (busSupport != null) {
            busSupport.shutdown();
        }
        BannerSupport bannerSupport = getService(BannerSupport.class);
        if (bannerSupport != null) {
            bannerSupport.destroy();
        }
        MVHelper mvHelper = getService(MVHelper.class);
        if (mvHelper != null) {
            mvHelper.renderManager().destroyRenderService();
        }
    }
549177
public void setAdapter(Adapter adapter) {
        if (mAdapter != null) {
            mAdapter.unregisterAdapterDataObserver(mObserver);
        }
        // end all running animations
        if (mItemAnimator != null) {
            mItemAnimator.endAnimations();
        }
        // Since animations are ended, mLayout.children should be equal to recyclerView.children.
        // This may not be true if item animator's end does not work as expected. (e.g. not release
        // children instantly). It is safer to use mLayout's child count.
        if (mLayout != null) {
            mLayout.removeAndRecycleAllViews(mRecycler);
            mLayout.removeAndRecycleScrapInt(mRecycler, true);
        }

        final Adapter oldAdapter = mAdapter;
        mAdapter = adapter;
        if (adapter != null) {
            adapter.registerAdapterDataObserver(mObserver);
        }
        if (mLayout != null) {
            mLayout.onAdapterChanged(oldAdapter, mAdapter);
        }
        mRecycler.onAdapterChanged(oldAdapter, mAdapter);
        mState.mStructureChanged = true;
        markKnownViewsInvalid();
        requestLayout();
    }
353443
public void dispose() {
        logDebug("Disposing.");
        mSetupDone = false;
        if (mServiceConn != null) {
            logDebug("Unbinding from service.");
            if (mContext != null) mContext.unbindService(mServiceConn);
        }
        mDisposed = true;
        mContext = null;
        mServiceConn = null;
        mService = null;
        mPurchaseListener = null;
    }
1274580
public void unbind(DataSource dataSource) throws NamingException {
        if (dataSource == null) {
            throw new IllegalArgumentException("dataSource cannot be null");
        }
        String jndiUrl = this.dataSourceBindings.get(dataSource);
        if (jndiUrl == null) {
            throw new NamingException("No such binding");
        }
        this.initialContext.unbind(jndiUrl);
        this.dataSourceBindings.remove(dataSource);
    }
71979
public void removeResultCollector(ResultCollector<?, DPO> resultCollector) {
        if (resultCollector != null) {
            removeTrigger(resultCollector);
            removeDataProvider(resultCollector);
        }
    }
812689
private View getViewOnRecyclerItemIndex(ViewGroup recyclerView, int recyclerViewIndex, int itemIndex){
		final long endTime = SystemClock.uptimeMillis() + Timeout.getSmallTimeout();
		View view = recyclerView.getChildAt(itemIndex);

		while(view == null){
			final boolean timedOut = SystemClock.uptimeMillis() > endTime;
			if (timedOut){
				Assert.fail("View is null and can therefore not be clicked!");
			}

			sleeper.sleep();
			recyclerView = (ViewGroup) viewFetcher.getIdenticalView(recyclerView);

			if(recyclerView == null){
				recyclerView = (ViewGroup) viewFetcher.getRecyclerView(false, recyclerViewIndex);
			}

			if(recyclerView != null){
				view = recyclerView.getChildAt(itemIndex);
			}
		}
		return view;
	}
727193
private void removeDataBindings() {
        Bindings.unbindContent(detailedDayView.getCalendarSources(),
                getCalendarSources());
        Bindings.unbindContentBidirectional(
                detailedDayView.getCalendarVisibilityMap(),
                getCalendarVisibilityMap());
        Bindings.unbindContent(detailedWeekView.getCalendarSources(),
                getCalendarSources());
        Bindings.unbindContentBidirectional(
                detailedWeekView.getCalendarVisibilityMap(),
                getCalendarVisibilityMap());
        Bindings.unbindContent(monthView.getCalendarSources(),
                getCalendarSources());
        Bindings.unbindContentBidirectional(
                monthView.getCalendarVisibilityMap(),
                getCalendarVisibilityMap());
    }