Commit 9a7cbb2d authored by Romain Reuillon's avatar Romain Reuillon

[Plugin] fix: thread and memory leak.

parent 9933dce9
......@@ -123,7 +123,7 @@ trait NetLogoTask extends ExternalTask {
private def withClassLoader[T](classLoader: ClassLoader)(f: T): T = {
val threadClassLoader = Thread.currentThread().getContextClassLoader
Thread.currentThread().setContextClassLoader(netLogoFactory().getNetLogoClassLoader)
Thread.currentThread().setContextClassLoader(classLoader)
try f
finally Thread.currentThread().setContextClassLoader(threadClassLoader)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment