mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid leaking DebugProcess on debug session end (with the tab still opened) pt.2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -403,8 +403,10 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
public void dispose() {
|
||||
getProcess().dispose();
|
||||
Disposer.dispose(myUpdateAlarm);
|
||||
DebuggerInvocationUtil.swingInvokeLater(getProject(),
|
||||
() -> getContextManager().setState(SESSION_EMPTY_CONTEXT, State.DISPOSED, Event.DISPOSE, null));
|
||||
DebuggerInvocationUtil.swingInvokeLater(getProject(), () -> {
|
||||
myContextManager.setState(SESSION_EMPTY_CONTEXT, State.DISPOSED, Event.DISPOSE, null);
|
||||
myContextManager.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
// ManagerCommands
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -46,4 +46,8 @@ public abstract class DebuggerStateManager {
|
||||
protected void fireStateChanged(@NotNull DebuggerContextImpl newContext, DebuggerSession.Event event) {
|
||||
myEventDispatcher.getMulticaster().changeEvent(newContext, event);
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
myEventDispatcher.getListeners().clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user