diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-09-20 20:43:40 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-09-20 20:43:40 +0200 |
commit | 41abd976afe0be0e4c7c2dbd6aee576fa41e8c47 (patch) | |
tree | 783c6988bcf4181def2909e215348135504aafd4 /src/eclipseAgent/lombok/eclipse/agent | |
parent | f37e2fd760e4aa8f01981b3ce000ccb7523a556d (diff) | |
download | lombok-41abd976afe0be0e4c7c2dbd6aee576fa41e8c47.tar.gz lombok-41abd976afe0be0e4c7c2dbd6aee576fa41e8c47.tar.bz2 lombok-41abd976afe0be0e4c7c2dbd6aee576fa41e8c47.zip |
Fix for issue #264: use of @Delegate would cause memory leaks in eclipse.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index 9929de2a..465b27fc 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -32,6 +32,7 @@ import java.util.IdentityHashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.WeakHashMap; import lombok.core.AST.Kind; import lombok.eclipse.Eclipse; @@ -177,7 +178,7 @@ public class PatchDelegate { return null; } - private static Map<ASTNode, Object> alreadyApplied = new IdentityHashMap<ASTNode, Object>(); + private static Map<ASTNode, Object> alreadyApplied = new WeakHashMap<ASTNode, Object>(); private static final Object MARKER = new Object(); private static void fillMethodBindings(CompilationUnitDeclaration cud, ClassScope scope, List<BindingTuple> methodsToDelegate) { |