diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2024-12-23 22:22:05 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2024-12-23 22:22:05 +0200 |
commit | 1e3010c111e99676b6c78588d922ff2f83b5223b (patch) | |
tree | c6b8ffbbbfb338758d64e3916d91b0b6994362be | |
parent | f7af060067ff6f9478478b2ae3a2b7410a5e550d (diff) | |
download | pf4j-1e3010c111e99676b6c78588d922ff2f83b5223b.tar.gz pf4j-1e3010c111e99676b6c78588d922ff2f83b5223b.zip |
Set class loader to null on unload plugin
-rw-r--r-- | pf4j/src/main/java/org/pf4j/AbstractPluginManager.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java index 626dbcb..ac41519 100644 --- a/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java +++ b/pf4j/src/main/java/org/pf4j/AbstractPluginManager.java @@ -337,6 +337,7 @@ public abstract class AbstractPluginManager implements PluginManager { if (classLoader instanceof Closeable) { try { ((Closeable) classLoader).close(); + classLoader = null; // help GC to collect the classloader } catch (IOException e) { throw new PluginRuntimeException(e, "Cannot close classloader"); } |