Do not dispose classLoader so that dependent types can be loaded on demand, like closures.
This commit is contained in:
committed by
Andrey Breslav
parent
e49f4a0722
commit
d08f2bc7ab
+1
-7
@@ -226,7 +226,7 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
return null;
|
||||
}
|
||||
|
||||
GeneratedClassLoader classLoader = null;
|
||||
GeneratedClassLoader classLoader;
|
||||
try {
|
||||
classLoader = new GeneratedClassLoader(state.getFactory(),
|
||||
new URLClassLoader(new URL[] {
|
||||
@@ -240,12 +240,6 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException("Failed to evaluate script: " + e, e);
|
||||
}
|
||||
finally {
|
||||
if (classLoader != null) {
|
||||
classLoader.dispose();
|
||||
}
|
||||
state.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user