Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
JavaSourceClassLoader creates a singleton JavaSourceIClassLoader in it's constructor. This is actually a cause for a memory leak in long-running server processes. The simplest fix is to create a new JavaSourceIClassLoader each time in generateByteCodes.
I'm not happy with that change. The important lines of code are:
/** * Collection of parsed, but uncompiled compilation units. */ private final Set unitCompilers = new HashSet(); // UnitCompilerIf I apply your change, then JSCL will no longer keep parsed but uncompiled CUs. That's probably a HUGE performance hit!
Anyway, why do you consider the singleton JSICL a memory leak? It is only references by the JSCL, and hence freed if the JSCL is GCed.