don't leak debugged process via cached toString() method in user data

This commit is contained in:
peter
2012-05-30 17:34:20 +02:00
parent 06262ae78b
commit 098fb83698
2 changed files with 5 additions and 0 deletions
@@ -775,6 +775,7 @@ public abstract class DebugProcessImpl implements DebugProcess {
myReturnValueWatcher = null;
myNodeRederersMap.clear();
myRenderers.clear();
DebuggerUtils.cleanupAfterProcessFinish(this);
myState.set(STATE_DETACHED);
try {
myDebugProcessDispatcher.getMulticaster().processDetached(this, closedByUser);
@@ -54,6 +54,10 @@ public abstract class DebuggerUtils {
"byte", "short", "int", "long", "float", "double", "boolean", "char"
));
public static void cleanupAfterProcessFinish(DebugProcess debugProcess) {
debugProcess.putUserData(TO_STRING_METHOD_KEY, null);
}
@NonNls
public static String getValueAsString(final EvaluationContext evaluationContext, Value value) throws EvaluateException {
try {