public void dispose() { for (SModel model : myListeningForModels) { ((SModelInternal) model).removeModelListener(myModelListener); } myListeningForModels.clear(); for (SNodeReference nodePointer : new ArrayList<SNodeReference>(myTypeCheckingContexts.keySet())) { removeContextForNode(nodePointer); } SModelRepository.getInstance().removeModelRepositoryListener(mySModelRepositoryListener); myClassLoaderManager.removeReloadHandler(myReloadHandler); INSTANCE = null; }
@Override public void disposeComponent() { GlobalSModelEventsManager.getInstance().removeGlobalModelListener(myListener); FileStatusManager.getInstance(myProject).removeFileStatusListener(myFileStatusListener); myClassLoaderManager.removeReloadHandler(myReloadListener); }