RTEditor/src/main/java/com/onegravity/rteditor/RTManager.java
public void onDestroy(boolean isSaved) {
        EventBus.getDefault().unregister(this);

        for (RTEditText editor : mEditors.values()) {
            editor.unregister();
            editor.onDestroy(isSaved);
        }
        mEditors.clear();

        for (RTToolbar toolbar : mToolbars.values()) {
            toolbar.removeToolbarListener();
        }
        mToolbars.clear();

        mRTApi = null;
    }
public void onDestroy(boolean isSaved) {
        EventBus.getDefault().unregister(this);

        for (RTEditText editor : mEditors.values()) {
            editor.unregister();
            editor.onDestroy(isSaved);
        }
        mEditors.clear();

        for (RTToolbar toolbar : mToolbars.values()) {
            toolbar.removeToolbarListener();
        }
        mToolbars.clear();

        mRTApi = null;
    }
public void onDestroy ( boolean isSaved ) { EventBus . getDefault ( ) . unregister ( this ) ; for ( RTEditText editor : mEditors . values ( ) ) { editor . unregister ( ) ; editor . onDestroy ( isSaved ) ; } mEditors . clear ( ) ; for ( RTToolbar toolbar : mToolbars . values ( ) ) { toolbar . removeToolbarListener ( ) ; } mToolbars . clear ( ) ; mRTApi = null ; }
Perform any final cleanup before the component is destroyed.

@param isSaved True if the text is saved, False if it's dismissed. This is
needed to decide whether media (images etc.) are to be
deleted.
Perform any final cleanup before the component is destroyed .