mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Ensure that we remove editor reference from myActiveEditors when editor is released (IDEA-240456)
GitOrigin-RevId: 541df88c4b136a3cab8d9f1d529656217bcd4351
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c47095f838
commit
60843512c6
@@ -84,6 +84,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -169,7 +170,7 @@ public final class DaemonListeners implements Disposable {
|
||||
return;
|
||||
}
|
||||
|
||||
myActiveEditors = activeEditors;
|
||||
myActiveEditors = new ArrayList<>(activeEditors);
|
||||
// do not stop daemon if idea loses/gains focus
|
||||
DaemonListeners.this.stopDaemon(true, "Active editor change");
|
||||
if (ApplicationManager.getApplication().isDispatchThread() && LaterInvocator.isInModalContext()) {
|
||||
@@ -209,6 +210,7 @@ public final class DaemonListeners implements Disposable {
|
||||
|
||||
@Override
|
||||
public void editorReleased(@NotNull EditorFactoryEvent event) {
|
||||
myActiveEditors.remove(event.getEditor());
|
||||
// mem leak after closing last editor otherwise
|
||||
UIUtil.invokeLaterIfNeeded(() -> {
|
||||
IntentionsUI intentionUI = myProject.getServiceIfCreated(IntentionsUI.class);
|
||||
|
||||
Reference in New Issue
Block a user