Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
7.45.0.Final
-
None
-
2020 Week 46-48 (from Nov 9)
-
-
Undefined
-
NEW
-
NEW
-
---
-
---
Description
When compiling a DRL containing declare types with executable model, the ProjectClassLoader associated with the compiled declare types is kept in scope by a couple of static maps:
org.drools.model.bitmask.BitMaskUtil.accessiblePropertiesCache; org.drools.modelcompiler.util.ClassUtil.ACCESSIBLE_PROPS_CACHE;
In turn, this generates a leak of all the resources associated with the ProjectClassLoader (e.g., MemoryFileSystem with all the source content of the kmodule).
We also have a concern on the thread safety of these static maps (as they do not appear to be synchronized). I.e., what happens if multiple kmodules are compiled concurrently by different threads?