How to clear editor instance when it is not in Dom

EditorView.updateListener.of() is still listening to other input changes. How to unsubscribe from
editor event handlers and clear instance.

Did you call .destroy() on the editor instance? Also, if it’s not in the DOM, why are changes still happening to it?