Skip to content

Ghidra is a software reverse engineering (SRE) framework

Test fix for improper dispose() call

dragonmacher6689e007be5b
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesPanel.java
index 7b345cffb3..ed5102c31d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesPanel.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesPanel.java
@@ -108,7 +108,6 @@ public class LocationReferencesPanel extends JPanel {
}
void dispose() {
- tablePanel.dispose();
table.dispose();
}
}
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesProvider.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesProvider.java
index 34ffcb2d1c..6422fbdebf 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesProvider.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/locationreferences/LocationReferencesProvider.java
@@ -198,11 +198,12 @@ public class LocationReferencesProvider extends ComponentProviderAdapter
}
void dispose() {
+ updateManager.dispose();
+ referencesPanel.dispose();
highlightManager.dispose();
navigatable.removeNavigatableListener(this);
program.removeListener(this);
program = null;
- updateManager.dispose();
tool.removeComponentProvider(this);
@@ -374,6 +375,7 @@ public class LocationReferencesProvider extends ComponentProviderAdapter
// locationReferencesPlugin.providerDismissed(this); here, as that can trigger a loop
// back when we are disposing.
clearHighlights();
+ updateManager.dispose();
referencesPanel.dispose();
}