I started to load plantuml.jar in its own classsloader, so that users can easily use any version they want (in IntelliJ
https://github.com/esteinberg/plantuml4idea ). I could also dispose of it when the IDE has not enough memory and it is not being used.
The problem is that FileSystem#currentDir holds net.sourceforge.plantuml.security.SFile, which prevents the classloader unloading. I could workaround it by either clearing it via reflection, or use my own threads which I can kill. But I think it would be more proper to simply store java.io.File, or an absolute path as a String, not SFile.
smetana.core.Z#instances2 seems to be cleared, so that is not an issue.