mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-462 break memory pinning of closed tool
This commit is contained in:
parent
941ba0caf9
commit
d3fb6b4758
4 changed files with 18 additions and 2 deletions
|
@ -654,6 +654,9 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
* @param provider the provider to be removed.
|
||||
*/
|
||||
public void removeComponent(ComponentProvider provider) {
|
||||
if (provider == defaultProvider) {
|
||||
defaultProvider = null;
|
||||
}
|
||||
placeholderManager.removeComponent(provider);
|
||||
}
|
||||
|
||||
|
@ -822,6 +825,7 @@ public class DockingWindowManager implements PropertyChangeListener, Placeholder
|
|||
setNextFocusPlaceholder(null);
|
||||
removeInstance(this);
|
||||
root = null;
|
||||
lastActiveWindow = null;
|
||||
}
|
||||
|
||||
void showComponent(ComponentProvider provider, boolean visibleState, boolean shouldEmphasize) {
|
||||
|
|
|
@ -369,7 +369,7 @@ public class StatusBar extends JPanel {
|
|||
}
|
||||
}
|
||||
|
||||
class StatusPanel extends JPanel {
|
||||
static class StatusPanel extends JPanel {
|
||||
Dimension prefSize;
|
||||
|
||||
StatusPanel(Component c, boolean addBorder) {
|
||||
|
|
|
@ -449,7 +449,7 @@ public abstract class PluginTool extends AbstractDockingTool {
|
|||
}
|
||||
|
||||
winMgr.setVisible(false);
|
||||
eventMgr.clearLastEvents();
|
||||
eventMgr.clear();
|
||||
pluginMgr.dispose();
|
||||
|
||||
toolActions.removeActions(ToolConstants.TOOL_OWNER);
|
||||
|
|
|
@ -236,6 +236,18 @@ public class EventManager {
|
|||
lastEventsByType.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear last plugin events fired, current event, listeners, etc.
|
||||
*/
|
||||
public void clear() {
|
||||
allEventListeners.clear();
|
||||
toolListeners.clear();
|
||||
currentEvent = null;
|
||||
lastEventsByType.clear();
|
||||
listenersByEventType.clear();
|
||||
eventQ.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of the last plugin events fired. EventManager maps the event class to the
|
||||
* last event fired.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue