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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user