fixing debugger memory leaks
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 19 Aug 2015 13:19:35 +0000 (16:19 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Wed, 19 Aug 2015 13:21:35 +0000 (16:21 +0300)
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/XDebuggerTreePanel.java

index 0cc1cf7b285dc5c0eb9cc89d14a8eab6cd0935f7..d9c87176a414ac5e847414b85012fa219943ca27 100644 (file)
@@ -52,6 +52,12 @@ public class XDebuggerTreePanel implements DnDSource {
     myMainPanel = new JPanel(new BorderLayout());
     myMainPanel.add(ScrollPaneFactory.createScrollPane(myTree), BorderLayout.CENTER);
     Disposer.register(parentDisposable, myTree);
     myMainPanel = new JPanel(new BorderLayout());
     myMainPanel.add(ScrollPaneFactory.createScrollPane(myTree), BorderLayout.CENTER);
     Disposer.register(parentDisposable, myTree);
+    Disposer.register(parentDisposable, new Disposable() {
+      @Override
+      public void dispose() {
+        myMainPanel.removeAll();
+      }
+    });
   }
 
   public XDebuggerTree getTree() {
   }
 
   public XDebuggerTree getTree() {