Fix memory leak by disposing a classloader. The real issue though is located in TypeInfoParser, that has WeakHashMap with values referencing keys.

This commit is contained in:
Maxim Shafirov
2012-02-02 20:35:15 +04:00
parent 14ab62cf7a
commit 04b0699cd5
4 changed files with 28 additions and 9 deletions
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull;
* @author yole
*/
public class GeneratedClassLoader extends ClassLoader {
private final ClassFileFactory state;
private ClassFileFactory state;
public GeneratedClassLoader(@NotNull ClassFileFactory state) {
this(state, GeneratedClassLoader.class.getClassLoader());
@@ -26,4 +26,8 @@ public class GeneratedClassLoader extends ClassLoader {
}
return super.findClass(name);
}
public void dispose() {
state = null;
}
}