mem leak fix

This commit is contained in:
Eugene Zhuravlev
2013-05-31 12:21:16 +04:00
parent 757b958200
commit bd382b8a7b
2 changed files with 8 additions and 1 deletions
@@ -324,6 +324,9 @@ public abstract class DebuggerTree extends DebuggerTreeBase implements DataProvi
}
else {
showMessage(session != null? session.getStateDescription() : DebuggerBundle.message("status.debug.stopped"));
if (session == null || session.isStopped()) {
getNodeFactory().clearHistory(); // save memory by clearing references on JDI objects
}
}
}
@@ -122,10 +122,14 @@ public class NodeManagerImpl extends NodeDescriptorFactoryImpl implements NodeMa
}
public void dispose() {
myHistories.clear();
clearHistory();
super.dispose();
}
public void clearHistory() {
myHistories.clear();
}
private DebuggerTree getTree() {
return myDebuggerTree;
}