Do not dispose classLoader so that dependent types can be loaded on demand, like closures.

This commit is contained in:
Ilya Ryzhenkov
2014-03-17 23:21:13 +04:00
committed by Andrey Breslav
parent e49f4a0722
commit d08f2bc7ab
@@ -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