From b913ddec0a176758ab95a6e7df378f66607aa44c Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 31 Jan 2006 18:14:25 +0000 Subject: [PATCH] free up maps during cleanup() processing --- .../internal/core/builder/StatefulNameEnvironment.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/StatefulNameEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/StatefulNameEnvironment.java index 713f6e728..8d00916d8 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/StatefulNameEnvironment.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/StatefulNameEnvironment.java @@ -14,6 +14,7 @@ package org.aspectj.ajdt.internal.core.builder; //import java.util.HashMap; +import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Map; @@ -28,9 +29,9 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.env.NameEnvironmentAnswer; public class StatefulNameEnvironment implements INameEnvironment { - Map classesFromName; - Set packageNames; - INameEnvironment baseEnvironment; + private Map classesFromName; + private Set packageNames; + private INameEnvironment baseEnvironment; public StatefulNameEnvironment(INameEnvironment baseEnvironment, Map classesFromName) { this.classesFromName = classesFromName; @@ -54,6 +55,8 @@ public class StatefulNameEnvironment implements INameEnvironment { public void cleanup() { baseEnvironment.cleanup(); + this.classesFromName = Collections.EMPTY_MAP; + this.packageNames = Collections.EMPTY_SET; } private NameEnvironmentAnswer findType(String name) { -- 2.39.5