Mercurial > hg > truffle
changeset 4995:7a4d120da7a0
Fix DebugScope memory leak.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 28 Feb 2012 21:25:21 +0100 |
parents | e37be4557f0b |
children | 11ce128f8d28 |
files | graal/com.oracle.max.graal.debug/src/com/oracle/max/graal/debug/internal/DebugScope.java |
diffstat | 1 files changed, 0 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.debug/src/com/oracle/max/graal/debug/internal/DebugScope.java Tue Feb 28 18:57:46 2012 +0100 +++ b/graal/com.oracle.max.graal.debug/src/com/oracle/max/graal/debug/internal/DebugScope.java Tue Feb 28 21:25:21 2012 +0100 @@ -34,13 +34,11 @@ private static ThreadLocal<DebugConfig> configTL = new ThreadLocal<>(); private static ThreadLocal<Throwable> lastExceptionThrownTL = new ThreadLocal<>(); private static DebugTimer scopeTime = Debug.timer("ScopeTime"); - private static DebugMetric scopeCount = Debug.metric("ScopeCount"); private final DebugScope parent; private Object[] context; - private List<DebugScope> children; private DebugValueMap valueMap; private String qualifiedName; private String name; @@ -122,7 +120,6 @@ } instanceTL.set(newChild); newChild.updateFlags(); - scopeCount.increment(); try (TimerCloseable a = scopeTime.start()) { return executeScope(runnable, callable); } finally { @@ -218,10 +215,6 @@ newQualifiedName = this.qualifiedName + SCOPE_SEP + newName; } DebugScope result = new DebugScope(newName, newQualifiedName, this, newContext); - if (children == null) { - children = new ArrayList<>(4); - } - children.add(result); return result; }