mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-09 18:11:42 +01:00
fix memory leaks in AccessibleJTree
(cherry picked from commit 561a7b8def)
This commit is contained in:
committed by
alexey.ushakov@jetbrains.com
parent
469ae8d591
commit
048b3402cf
@@ -133,7 +133,7 @@ class CAccessible extends CFRetainedResource implements Accessible {
|
||||
}
|
||||
}
|
||||
} else if (name.equals(ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY)) {
|
||||
if (newValue instanceof AccessibleContext) {
|
||||
if (newValue == null || newValue instanceof AccessibleContext) {
|
||||
activeDescendant = (AccessibleContext)newValue;
|
||||
if (newValue instanceof Accessible) {
|
||||
Accessible a = (Accessible)newValue;
|
||||
|
||||
@@ -4268,9 +4268,6 @@ public class JTree extends JComponent implements Scrollable, Accessible
|
||||
implements AccessibleSelection, TreeSelectionListener,
|
||||
TreeModelListener, TreeExpansionListener {
|
||||
|
||||
TreePath leadSelectionPath;
|
||||
Accessible leadSelectionAccessible;
|
||||
|
||||
/**
|
||||
* Constructs {@code AccessibleJTree}
|
||||
*/
|
||||
@@ -4282,12 +4279,6 @@ public class JTree extends JComponent implements Scrollable, Accessible
|
||||
}
|
||||
JTree.this.addTreeExpansionListener(this);
|
||||
JTree.this.addTreeSelectionListener(this);
|
||||
leadSelectionPath = JTree.this.getLeadSelectionPath();
|
||||
leadSelectionAccessible = (leadSelectionPath != null)
|
||||
? new AccessibleJTreeNode(JTree.this,
|
||||
leadSelectionPath,
|
||||
JTree.this)
|
||||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user